[QGIS Commit] r11167 - branches/symbology-ng-branch/src/gui/symbology-ng

svn_qgis at osgeo.org svn_qgis at osgeo.org
Fri Jul 24 08:26:35 EDT 2009


Author: wonder
Date: 2009-07-24 08:26:35 -0400 (Fri, 24 Jul 2009)
New Revision: 11167

Modified:
   branches/symbology-ng-branch/src/gui/symbology-ng/qgsrendererv2propertiesdialog.cpp
   branches/symbology-ng-branch/src/gui/symbology-ng/qgssymbollevelsv2dialog.cpp
   branches/symbology-ng-branch/src/gui/symbology-ng/qgssymbollevelsv2dialog.h
Log:
Fixed modification of rendering pass in symbol levels dialog, fixed crash when using apply in vector layer props dialog.


Modified: branches/symbology-ng-branch/src/gui/symbology-ng/qgsrendererv2propertiesdialog.cpp
===================================================================
--- branches/symbology-ng-branch/src/gui/symbology-ng/qgsrendererv2propertiesdialog.cpp	2009-07-24 11:22:42 UTC (rev 11166)
+++ branches/symbology-ng-branch/src/gui/symbology-ng/qgsrendererv2propertiesdialog.cpp	2009-07-24 12:26:35 UTC (rev 11167)
@@ -109,8 +109,8 @@
 
 void QgsRendererV2PropertiesDialog::apply()
 {
-  mLayer->setRendererV2(mRenderer);
-  mRenderer = NULL;
+  // use clone of our temporary renderer
+  mLayer->setRendererV2( mRenderer->clone() );
 }
 
 void QgsRendererV2PropertiesDialog::onOK()

Modified: branches/symbology-ng-branch/src/gui/symbology-ng/qgssymbollevelsv2dialog.cpp
===================================================================
--- branches/symbology-ng-branch/src/gui/symbology-ng/qgssymbollevelsv2dialog.cpp	2009-07-24 11:22:42 UTC (rev 11166)
+++ branches/symbology-ng-branch/src/gui/symbology-ng/qgssymbollevelsv2dialog.cpp	2009-07-24 12:26:35 UTC (rev 11167)
@@ -47,6 +47,8 @@
     setDefaultLevels();
 
   populateTable();
+
+  connect(tableLevels, SIGNAL(cellChanged(int,int)), this, SLOT(renderingPassChanged(int,int)));
 }
 
 void QgsSymbolLevelsV2Dialog::populateTable()
@@ -94,3 +96,13 @@
 {
   return chkEnable->isChecked();
 }
+
+void QgsSymbolLevelsV2Dialog::renderingPassChanged(int row, int column)
+{
+  if (row < 0 || row >= mSymbols.count())
+    return;
+  QgsSymbolV2* sym = mSymbols[row];
+  if (column < 0 || column >= sym->symbolLayerCount())
+    return;
+  sym->symbolLayer(column)->setRenderingPass( tableLevels->item(row, column)->text().toInt() );
+}

Modified: branches/symbology-ng-branch/src/gui/symbology-ng/qgssymbollevelsv2dialog.h
===================================================================
--- branches/symbology-ng-branch/src/gui/symbology-ng/qgssymbollevelsv2dialog.h	2009-07-24 11:22:42 UTC (rev 11166)
+++ branches/symbology-ng-branch/src/gui/symbology-ng/qgssymbollevelsv2dialog.h	2009-07-24 12:26:35 UTC (rev 11167)
@@ -20,6 +20,8 @@
 public slots:
     void updateUi();
 
+    void renderingPassChanged( int row, int column );
+
 protected:
     void populateTable();
     void setDefaultLevels();



More information about the QGIS-commit mailing list