Skip to content

Commit 1c42e9a

Browse files
author
jef
committed
fix WMS selection
git-svn-id: http://svn.osgeo.org/qgis/trunk@14318 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 5efadc1 commit 1c42e9a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/app/qgswmssourceselect.cpp

+6-1
Original file line numberDiff line numberDiff 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() )

0 commit comments

Comments
 (0)