Skip to content
Permalink
Browse files

[bugfix] Ensure parent group visibility when apply theme

Fixes #17927  Group Layers not activating when Theme is selected.
  • Loading branch information
elpaso committed Jan 24, 2018
1 parent cf35aff commit b64444720ccc1ef27b3b0af6f658919d0c22c02f
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/core/qgsmapthemecollection.cpp
@@ -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;

0 comments on commit b644447

Please sign in to comment.
You can’t perform that action at this time.