Skip to content
Permalink
Browse files
Ensure group layers are correctly handled when bridging layer tree to…
… canvas layers
  • Loading branch information
nyalldawson committed Nov 23, 2021
1 parent e5e596a commit 7ffa318540b233be338529851e03b62a99fbacd1
Showing with 10 additions and 0 deletions.
  1. +10 −0 src/gui/layertree/qgslayertreemapcanvasbridge.cpp
@@ -154,7 +154,17 @@ void QgsLayerTreeMapCanvasBridge::setCanvasLayers( QgsLayerTreeNode *node, QList

const QList<QgsLayerTreeNode *> children = node->children();
for ( QgsLayerTreeNode *child : children )
{
if ( QgsLayerTreeGroup *group = QgsLayerTree::toGroup( node ) )
{
if ( QgsGroupLayer *groupLayer = group->groupLayer() )
{
canvasLayers << groupLayer;
continue;
}
}
setCanvasLayers( child, canvasLayers, overviewLayers, allLayers );
}
}

void QgsLayerTreeMapCanvasBridge::deferredSetCanvasLayers()

0 comments on commit 7ffa318

Please sign in to comment.