File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -672,7 +672,7 @@ void QgsWMSSourceSelect::applySelectionConstraints( QTreeWidgetItem *item )
672672 // process child layers and style selection first
673673 // then
674674 // if all child layers of a group are selected, deselect them and select the group and collapse it
675- // if some child layers are selected, deselect the group
675+ // if some child layers are selected, deselect the group and all parents
676676 // otherwise keep the selection state of the group
677677 int n = 0 ;
678678 for ( int i = 0 ; i < item->childCount (); i++ )
@@ -692,6 +692,11 @@ void QgsWMSSourceSelect::applySelectionConstraints( QTreeWidgetItem *item )
692692 item->child ( i )->setSelected ( false );
693693 item->setExpanded ( false );
694694 }
695+ else
696+ {
697+ for ( QTreeWidgetItem *parent = item->parent (); parent; parent = parent->parent () )
698+ parent->setSelected ( false );
699+ }
695700 }
696701 }
697702 else if ( styleName.isEmpty () )
You can’t perform that action at this time.
0 commit comments