[QGIS Commit] r8897 - trunk/qgis/src/app

svn_qgis at osgeo.org svn_qgis at osgeo.org
Fri Jul 25 07:35:38 EDT 2008


Author: timlinux
Date: 2008-07-25 07:35:37 -0400 (Fri, 25 Jul 2008)
New Revision: 8897

Modified:
   trunk/qgis/src/app/qgisapp.cpp
Log:
Partial fix for ticket #1182 - Mark project as dirty when adding layers.

Modified: trunk/qgis/src/app/qgisapp.cpp
===================================================================
--- trunk/qgis/src/app/qgisapp.cpp	2008-07-25 10:23:21 UTC (rev 8896)
+++ trunk/qgis/src/app/qgisapp.cpp	2008-07-25 11:35:37 UTC (rev 8897)
@@ -2081,6 +2081,8 @@
 
       // Register this layer with the layers registry
       QgsMapLayerRegistry::instance()->addMapLayer(layer);
+      // notify the project we've made a change
+      QgsProject::instance()->dirty(true);
 
     }
     else
@@ -2174,6 +2176,8 @@
       {
         // register this layer with the central layers registry
         QgsMapLayerRegistry::instance()->addMapLayer(layer);
+        // notify the project we've made a change
+        QgsProject::instance()->dirty(true);
       }
       else
       {
@@ -4448,6 +4452,8 @@
   {
     // Register this layer with the layers registry
     QgsMapLayerRegistry::instance()->addMapLayer(layer);
+    // notify the project we've made a change
+    QgsProject::instance()->dirty(true);
 
     statusBar()->showMessage(mMapCanvas->extent().stringRep(2));
 
@@ -4493,6 +4499,8 @@
     // not necessary since adding to registry adds to canvas mMapCanvas->addLayer(theMapLayer);
 
     statusBar()->showMessage(mMapCanvas->extent().stringRep(2));
+    // notify the project we've made a change
+    QgsProject::instance()->dirty(true);
 
   }
   else
@@ -5167,6 +5175,8 @@
       SIGNAL(setStatus(QString)),
       this,
       SLOT(showStatusMessage(QString)));
+  // notify the project we've made a change
+  QgsProject::instance()->dirty(true);
 
   return true;
 }



More information about the QGIS-commit mailing list