Skip to content
Permalink
Browse files
Applied patch from Adrien to remove negative selection ids when commi…
…ting added features

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@8783 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Jul 15, 2008
1 parent e7677ee commit e1342f5
Showing 1 changed file with 9 additions and 0 deletions.
@@ -2476,6 +2476,15 @@ bool QgsVectorLayer::commitChanges()
}
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;

0 comments on commit e1342f5

Please sign in to comment.