Skip to content

Commit

Permalink
Merge pull request #6163 from elpaso/bugfix-17927-themes-group-visibi…
Browse files Browse the repository at this point in the history
…lity

[bugfix] Ensure parent group visibility when apply theme
  • Loading branch information
elpaso committed Jan 25, 2018
2 parents f0e01d8 + b644447 commit 30043db
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 30043db

Please sign in to comment.