Skip to content

Commit

Permalink
don't try to add attributes twice, if some attribute change fails
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@8208 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Mar 12, 2008
1 parent 72460d7 commit 4ca70cc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/app/qgsattributetable.cpp
Expand Up @@ -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)
Expand Down

0 comments on commit 4ca70cc

Please sign in to comment.