[QGIS Commit] r14318 - trunk/qgis/src/app

svn_qgis at osgeo.org svn_qgis at osgeo.org
Thu Sep 30 18:33:00 EDT 2010


Author: jef
Date: 2010-09-30 22:33:00 +0000 (Thu, 30 Sep 2010)
New Revision: 14318

Modified:
   trunk/qgis/src/app/qgswmssourceselect.cpp
Log:
fix WMS selection

Modified: trunk/qgis/src/app/qgswmssourceselect.cpp
===================================================================
--- trunk/qgis/src/app/qgswmssourceselect.cpp	2010-09-30 22:26:23 UTC (rev 14317)
+++ trunk/qgis/src/app/qgswmssourceselect.cpp	2010-09-30 22:33:00 UTC (rev 14318)
@@ -672,7 +672,7 @@
     //   process child layers and style selection first
     // then
     //   if all child layers of a group are selected, deselect them and select the group and collapse it
-    //   if some child layers are selected, deselect the group
+    //   if some child layers are selected, deselect the group and all parents
     //   otherwise keep the selection state of the group
     int n = 0;
     for ( int i = 0; i < item->childCount(); i++ )
@@ -692,6 +692,11 @@
           item->child( i )->setSelected( false );
         item->setExpanded( false );
       }
+      else
+      {
+        for ( QTreeWidgetItem *parent = item->parent(); parent;  parent = parent->parent() )
+          parent->setSelected( false );
+      }
     }
   }
   else if ( styleName.isEmpty() )



More information about the QGIS-commit mailing list