Skip to content

Commit 4668d22

Browse files
authored
fix crash when connecting layerOrderChanged signal
1 parent b00b3f6 commit 4668d22

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core/layertree/qgslayertree.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
QgsLayerTree::QgsLayerTree()
2121
{
2222
connect( this, &QgsLayerTree::addedChildren, this, &QgsLayerTree::nodeAddedChildren );
23-
connect( this, &QgsLayerTree::removedChildren, this, &QgsLayerTree::nodeRemovedChildren );
23+
connect( this, &QgsLayerTree::willRemoveChildren, this, &QgsLayerTree::nodeRemovedChildren );
2424
}
2525

2626
QgsLayerTree::QgsLayerTree( const QgsLayerTree &other )
@@ -29,7 +29,7 @@ QgsLayerTree::QgsLayerTree( const QgsLayerTree &other )
2929
, mHasCustomLayerOrder( other.mHasCustomLayerOrder )
3030
{
3131
connect( this, &QgsLayerTree::addedChildren, this, &QgsLayerTree::nodeAddedChildren );
32-
connect( this, &QgsLayerTree::removedChildren, this, &QgsLayerTree::nodeRemovedChildren );
32+
connect( this, &QgsLayerTree::willRemoveChildren, this, &QgsLayerTree::nodeRemovedChildren );
3333
}
3434

3535
QList<QgsMapLayer *> QgsLayerTree::customLayerOrder() const

0 commit comments

Comments
 (0)