Skip to content
Permalink
Browse files

don't try to add attributes twice, if some attribute change fails

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@8208 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Mar 12, 2008
1 parent 72460d7 commit 4ca70cca965b4751771b732dc8469b4df83f85c4
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/app/qgsattributetable.cpp
@@ -441,6 +441,10 @@ bool QgsAttributeTable::commitChanges(QgsVectorLayer* layer)
{
// 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)

0 comments on commit 4ca70cc

Please sign in to comment.
You can’t perform that action at this time.