[QGIS Commit] r9694 - in branches/vector_overlay_branch/src: core plugins/diagram_overlay

svn_qgis at osgeo.org svn_qgis at osgeo.org
Mon Nov 24 06:27:29 EST 2008


Author: mhugent
Date: 2008-11-24 06:27:29 -0500 (Mon, 24 Nov 2008)
New Revision: 9694

Modified:
   branches/vector_overlay_branch/src/core/qgsmaprenderer.cpp
   branches/vector_overlay_branch/src/plugins/diagram_overlay/qgsdiagramdialog.cpp
Log:
only display visible overlays

Modified: branches/vector_overlay_branch/src/core/qgsmaprenderer.cpp
===================================================================
--- branches/vector_overlay_branch/src/core/qgsmaprenderer.cpp	2008-11-24 11:01:54 UTC (rev 9693)
+++ branches/vector_overlay_branch/src/core/qgsmaprenderer.cpp	2008-11-24 11:27:29 UTC (rev 9694)
@@ -367,8 +367,11 @@
             QList<QgsVectorOverlay*>::iterator overlayIt = thisLayerOverlayList.begin();
             for(; overlayIt != thisLayerOverlayList.end(); ++overlayIt)
             {
-              (*overlayIt)->createOverlayObjects(mRenderContext.extent());
-              allOverlayList.push_back(*overlayIt);
+                if((*overlayIt)->displayFlag())
+                {
+                    (*overlayIt)->createOverlayObjects(mRenderContext.extent());
+                    allOverlayList.push_back(*overlayIt);
+                }
             }
 
         overlayManager->addLayer(vl, thisLayerOverlayList);

Modified: branches/vector_overlay_branch/src/plugins/diagram_overlay/qgsdiagramdialog.cpp
===================================================================
--- branches/vector_overlay_branch/src/plugins/diagram_overlay/qgsdiagramdialog.cpp	2008-11-24 11:01:54 UTC (rev 9693)
+++ branches/vector_overlay_branch/src/plugins/diagram_overlay/qgsdiagramdialog.cpp	2008-11-24 11:27:29 UTC (rev 9694)
@@ -200,8 +200,11 @@
     {
       diagramOverlay->setDisplayFlag(false);
     }
-  
-  //add the new overlay to the vector layer
+
+    //remove already existing diagram overlays
+    mVectorLayer-> removeOverlay("diagram");
+
+  //finally add the new overlay to the vector layer
   mVectorLayer->addOverlay(diagramOverlay);
 }
 



More information about the QGIS-commit mailing list