[QGIS Commit] r12480 - in trunk/qgis: . src/gui/symbology-ng

svn_qgis at osgeo.org svn_qgis at osgeo.org
Tue Dec 15 15:59:25 EST 2009


Author: wonder
Date: 2009-12-15 15:59:25 -0500 (Tue, 15 Dec 2009)
New Revision: 12480

Modified:
   trunk/qgis/CONTRIBUTORS
   trunk/qgis/src/gui/symbology-ng/qgscategorizedsymbolrendererv2widget.cpp
   trunk/qgis/src/gui/symbology-ng/qgscategorizedsymbolrendererv2widget.h
Log:
Applied patch from #2285 by Mark Baas.
Thanks for contributing!


Modified: trunk/qgis/CONTRIBUTORS
===================================================================
--- trunk/qgis/CONTRIBUTORS	2009-12-15 20:39:23 UTC (rev 12479)
+++ trunk/qgis/CONTRIBUTORS	2009-12-15 20:59:25 UTC (rev 12480)
@@ -41,3 +41,4 @@
 Richard Duivenvoorde
 Alexander Bruy
 Andres Manz
+Mark Baas

Modified: trunk/qgis/src/gui/symbology-ng/qgscategorizedsymbolrendererv2widget.cpp
===================================================================
--- trunk/qgis/src/gui/symbology-ng/qgscategorizedsymbolrendererv2widget.cpp	2009-12-15 20:39:23 UTC (rev 12479)
+++ trunk/qgis/src/gui/symbology-ng/qgscategorizedsymbolrendererv2widget.cpp	2009-12-15 20:59:25 UTC (rev 12480)
@@ -61,6 +61,7 @@
   connect( btnAddCategories, SIGNAL( clicked() ), this, SLOT( addCategories() ) );
   connect( btnDeleteCategory, SIGNAL( clicked() ), this, SLOT( deleteCategory() ) );
   connect( btnDeleteAllCategories, SIGNAL( clicked() ), this, SLOT( deleteAllCategories() ) );
+  connect( m, SIGNAL( itemChanged( QStandardItem * ) ), this, SLOT( changeCurrentValue( QStandardItem * ) ) );
 
   // update GUI from renderer
   updateUiFromRenderer();
@@ -330,3 +331,12 @@
   populateCategories();
 }
 
+void QgsCategorizedSymbolRendererV2Widget::changeCurrentValue( QStandardItem * item )
+{
+  if ( item->column() == 1 )
+  {
+    QString label = item->text();
+    int idx = item->row();
+    mRenderer->updateCategoryLabel( idx, label );
+  }
+}

Modified: trunk/qgis/src/gui/symbology-ng/qgscategorizedsymbolrendererv2widget.h
===================================================================
--- trunk/qgis/src/gui/symbology-ng/qgscategorizedsymbolrendererv2widget.h	2009-12-15 20:39:23 UTC (rev 12479)
+++ trunk/qgis/src/gui/symbology-ng/qgscategorizedsymbolrendererv2widget.h	2009-12-15 20:59:25 UTC (rev 12480)
@@ -2,6 +2,7 @@
 #define QGSCATEGORIZEDSYMBOLRENDERERV2WIDGET_H
 
 #include "qgsrendererv2widget.h"
+#include <QStandardItem>
 
 class QgsCategorizedSymbolRendererV2;
 
@@ -27,6 +28,7 @@
     void addCategories();
     void deleteCategory();
     void deleteAllCategories();
+    void changeCurrentValue( QStandardItem * item );
 
   protected:
 



More information about the QGIS-commit mailing list