[QGIS Commit] r8783 - trunk/qgis/src/core

svn_qgis at osgeo.org svn_qgis at osgeo.org
Tue Jul 15 04:36:10 EDT 2008


Author: mhugent
Date: 2008-07-15 04:36:10 -0400 (Tue, 15 Jul 2008)
New Revision: 8783

Modified:
   trunk/qgis/src/core/qgsvectorlayer.cpp
Log:
Applied patch from Adrien to remove negative selection ids when commiting added features

Modified: trunk/qgis/src/core/qgsvectorlayer.cpp
===================================================================
--- trunk/qgis/src/core/qgsvectorlayer.cpp	2008-07-15 08:22:29 UTC (rev 8782)
+++ trunk/qgis/src/core/qgsvectorlayer.cpp	2008-07-15 08:36:10 UTC (rev 8783)
@@ -2476,6 +2476,15 @@
     }
     else
     {
+      //Remove all negative Id in selected features as they are not valid any more after commit
+      if(mSelectedFeatureIds.size() > 0)
+	{
+	  for(QgsFeatureList::iterator it = mAddedFeatures.begin(); it != mAddedFeatures.end(); ++it)
+	    {
+	      mSelectedFeatureIds.remove(it->featureId());
+	    }
+	}  
+
       // done, remove features from the list
       mAddedFeatures.clear();
       addedFeaturesOk = TRUE;



More information about the QGIS-commit mailing list