[QGIS Commit] r11395 - trunk/qgis/src/gui

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sun Aug 16 06:18:34 EDT 2009


Author: mhugent
Date: 2009-08-16 06:18:34 -0400 (Sun, 16 Aug 2009)
New Revision: 11395

Modified:
   trunk/qgis/src/gui/qgscomposerview.cpp
Log:
Fix for crash when removing a drawing composer map

Modified: trunk/qgis/src/gui/qgscomposerview.cpp
===================================================================
--- trunk/qgis/src/gui/qgscomposerview.cpp	2009-08-16 05:43:06 UTC (rev 11394)
+++ trunk/qgis/src/gui/qgscomposerview.cpp	2009-08-16 10:18:34 UTC (rev 11395)
@@ -310,8 +310,12 @@
   {
     for ( ; itemIt != composerItemList.end(); ++itemIt )
     {
-      composition()->removeItem( *itemIt );
-      emit itemRemoved( *itemIt );
+      QgsComposerMap* map = dynamic_cast<QgsComposerMap*>( *itemIt );
+      if ( !map || !map->isDrawing() ) //don't delete a composer map while it draws
+      {
+        composition()->removeItem( *itemIt );
+        emit itemRemoved( *itemIt );
+      }
     }
   }
 



More information about the QGIS-commit mailing list