Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Tiny clean up
  • Loading branch information
nyalldawson committed Nov 25, 2021
1 parent 82274e8 commit 23c4ead
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/core/layertree/qgslayertree.cpp
Expand Up @@ -19,14 +19,18 @@

QgsLayerTree::QgsLayerTree()
{
connect( this, &QgsLayerTree::addedChildren, this, &QgsLayerTree::nodeAddedChildren );
connect( this, &QgsLayerTree::removedChildren, this, &QgsLayerTree::nodeRemovedChildren );
init();
}

QgsLayerTree::QgsLayerTree( const QgsLayerTree &other )
: QgsLayerTreeGroup( other )
, mCustomLayerOrder( other.mCustomLayerOrder )
, mHasCustomLayerOrder( other.mHasCustomLayerOrder )
{
init();
}

void QgsLayerTree::init()
{
connect( this, &QgsLayerTree::addedChildren, this, &QgsLayerTree::nodeAddedChildren );
connect( this, &QgsLayerTree::removedChildren, this, &QgsLayerTree::nodeRemovedChildren );
Expand Down
3 changes: 3 additions & 0 deletions src/core/layertree/qgslayertree.h
Expand Up @@ -234,6 +234,9 @@ class CORE_EXPORT QgsLayerTree : public QgsLayerTreeGroup
private:
//! Copy constructor \see clone()
QgsLayerTree( const QgsLayerTree &other );

void init();

void addMissingLayers();
QgsWeakMapLayerPointerList mCustomLayerOrder;
bool mHasCustomLayerOrder = false;
Expand Down

0 comments on commit 23c4ead

Please sign in to comment.