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

svn_qgis at osgeo.org svn_qgis at osgeo.org
Wed Mar 12 05:57:46 EDT 2008


Author: jef
Date: 2008-03-12 05:57:45 -0400 (Wed, 12 Mar 2008)
New Revision: 8208

Modified:
   trunk/qgis/src/app/qgsattributetable.cpp
Log:
don't try to add attributes twice, if some attribute change fails

Modified: trunk/qgis/src/app/qgsattributetable.cpp
===================================================================
--- trunk/qgis/src/app/qgsattributetable.cpp	2008-03-12 09:52:00 UTC (rev 8207)
+++ trunk/qgis/src/app/qgsattributetable.cpp	2008-03-12 09:57:45 UTC (rev 8208)
@@ -441,6 +441,10 @@
       {
         // add new attributes beforehand, so attribute changes can be applied
         isSuccessful = layer->commitAttributeChanges(QgsAttributeIds(), mAddedAttributes, QgsChangedAttributesMap());
+
+        if(isSuccessful)
+          // forget added attributes on successful addition
+          mAddedAttributes.clear();
       }
 
       if(isSuccessful)



More information about the QGIS-commit mailing list