[QGIS Commit] r9828 - branches/vector_overlay_branch/src/plugins/diagram_overlay

svn_qgis at osgeo.org svn_qgis at osgeo.org
Tue Dec 16 10:32:07 EST 2008


Author: mhugent
Date: 2008-12-16 10:32:06 -0500 (Tue, 16 Dec 2008)
New Revision: 9828

Modified:
   branches/vector_overlay_branch/src/plugins/diagram_overlay/qgsdiagramdialog.cpp
   branches/vector_overlay_branch/src/plugins/diagram_overlay/qgsdiagramoverlay.cpp
   branches/vector_overlay_branch/src/plugins/diagram_overlay/qgssvgdiagramfactorywidget.cpp
Log:
fix bug when reopening svg symbol dialog

Modified: branches/vector_overlay_branch/src/plugins/diagram_overlay/qgsdiagramdialog.cpp
===================================================================
--- branches/vector_overlay_branch/src/plugins/diagram_overlay/qgsdiagramdialog.cpp	2008-12-16 13:53:59 UTC (rev 9827)
+++ branches/vector_overlay_branch/src/plugins/diagram_overlay/qgsdiagramdialog.cpp	2008-12-16 15:32:06 UTC (rev 9828)
@@ -286,11 +286,16 @@
 
 	      
 	      //classification attribute
-	      QString classFieldName = QgsDiagramOverlay::attributeNameFromIndex(theFactory->scalingAttributes().first(), mVectorLayer);
-	      mClassificationComboBox->setCurrentIndex(mClassificationComboBox->findText(classFieldName));
+              QString classFieldName;
+              QgsAttributeList attList = previousDiagramRenderer->classificationAttributes();
+              if(attList.size() > 0)
+              {
+                classFieldName  = QgsDiagramOverlay::attributeNameFromIndex(attList.first(), mVectorLayer);
+                mClassificationComboBox->setCurrentIndex(mClassificationComboBox->findText(classFieldName));
 	      
-	      //classification type (specific for renderer subclass)
-	      mClassificationTypeComboBox->setCurrentIndex(mClassificationTypeComboBox->findText("linearly scaling"));
+                //classification type (specific for renderer subclass)
+                mClassificationTypeComboBox->setCurrentIndex(mClassificationTypeComboBox->findText("linearly scaling"));
+                }
 	      
 	      //apply the renderer settings to the renderer specific dialog
 	      if(mWidgetStackRenderers->count() > 0)

Modified: branches/vector_overlay_branch/src/plugins/diagram_overlay/qgsdiagramoverlay.cpp
===================================================================
--- branches/vector_overlay_branch/src/plugins/diagram_overlay/qgsdiagramoverlay.cpp	2008-12-16 13:53:59 UTC (rev 9827)
+++ branches/vector_overlay_branch/src/plugins/diagram_overlay/qgsdiagramoverlay.cpp	2008-12-16 15:32:06 UTC (rev 9828)
@@ -50,6 +50,11 @@
 
 void QgsDiagramOverlay::createOverlayObjects(const QgsRenderContext& renderContext)
 {
+    if(!mDisplayFlag)
+    {
+        return;
+    }
+
   //memory cleanup
   for(QMap<int, QgsOverlayObject*>::iterator it = mOverlayObjects.begin(); it != mOverlayObjects.end(); ++it)
     {

Modified: branches/vector_overlay_branch/src/plugins/diagram_overlay/qgssvgdiagramfactorywidget.cpp
===================================================================
--- branches/vector_overlay_branch/src/plugins/diagram_overlay/qgssvgdiagramfactorywidget.cpp	2008-12-16 13:53:59 UTC (rev 9827)
+++ branches/vector_overlay_branch/src/plugins/diagram_overlay/qgssvgdiagramfactorywidget.cpp	2008-12-16 15:32:06 UTC (rev 9828)
@@ -70,7 +70,7 @@
 
 void QgsSVGDiagramFactoryWidget::setExistingFactory(const QgsDiagramFactory* f)
 {
-    //nothing to be done
+    mPreviewListWidget->setLayoutDirection(Qt::LeftToRight);
 }
 
 void QgsSVGDiagramFactoryWidget::on_mPictureBrowseButton_clicked()



More information about the QGIS-commit mailing list