Skip to content

Commit

Permalink
[bugfix] Ensure parent group visibility when apply theme
Browse files Browse the repository at this point in the history
Fixes #17927  Group Layers not activating when Theme is selected.
  • Loading branch information
elpaso committed Jan 24, 2018
1 parent cf35aff commit b644447
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/core/qgsmapthemecollection.cpp
Expand Up @@ -103,7 +103,11 @@ void QgsMapThemeCollection::applyThemeToLayer( QgsLayerTreeLayer *nodeLayer, Qgs
MapThemeLayerRecord layerRec;
bool isVisible = findRecordForLayer( nodeLayer->layer(), rec, layerRec );

nodeLayer->setItemVisibilityChecked( isVisible );
// Make sure the whole tree is visible
if ( isVisible )
nodeLayer->setItemVisibilityCheckedParentRecursive( isVisible );
else
nodeLayer->setItemVisibilityChecked( isVisible );

if ( !isVisible )
return;
Expand Down

0 comments on commit b644447

Please sign in to comment.