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

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sat Mar 12 17:58:17 EST 2011


Author: jef
Date: 2011-03-12 14:58:17 -0800 (Sat, 12 Mar 2011)
New Revision: 15458

Modified:
   trunk/qgis/src/app/qgswmssourceselect.cpp
Log:
fix #3591

Modified: trunk/qgis/src/app/qgswmssourceselect.cpp
===================================================================
--- trunk/qgis/src/app/qgswmssourceselect.cpp	2011-03-12 22:10:09 UTC (rev 15457)
+++ trunk/qgis/src/app/qgswmssourceselect.cpp	2011-03-12 22:58:17 UTC (rev 15458)
@@ -337,7 +337,7 @@
   {
     QgsNumericSortTreeWidgetItem *lItem = createItem( layer->orderId, QStringList() << layer->name << layer->title << layer->abstract, items, layerAndStyleCount, layerParents, layerParentNames );
 
-    lItem->setData( 0, Qt::UserRole, layer->name );
+    lItem->setData( 0, Qt::UserRole + 0, layer->name );
     lItem->setData( 0, Qt::UserRole + 1, "" );
     lItem->setData( 0, Qt::UserRole + 2, layer->crs );
 
@@ -674,6 +674,8 @@
     enableLayersForCrs( lstLayers->topLevelItem( i ) );
   }
 
+  updateButtons();
+
   // update the display of this widget
   update();
 }
@@ -758,7 +760,7 @@
 void QgsWMSSourceSelect::collectNamedLayers( QTreeWidgetItem *item, QStringList &layers, QStringList &styles )
 {
   QString layerName = item->data( 0, Qt::UserRole + 0 ).toString();
-  QString styleName = item->data( 1, Qt::UserRole + 0 ).toString();
+  QString styleName = item->data( 0, Qt::UserRole + 1 ).toString();
   if ( layerName.isEmpty() )
   {
     // layer group



More information about the QGIS-commit mailing list