Skip to content

Commit 4ca70cc

Browse files
author
jef
committedMar 12, 2008
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

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎src/app/qgsattributetable.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,10 @@ bool QgsAttributeTable::commitChanges(QgsVectorLayer* layer)
441441
{
442442
// add new attributes beforehand, so attribute changes can be applied
443443
isSuccessful = layer->commitAttributeChanges(QgsAttributeIds(), mAddedAttributes, QgsChangedAttributesMap());
444+
445+
if(isSuccessful)
446+
// forget added attributes on successful addition
447+
mAddedAttributes.clear();
444448
}
445449

446450
if(isSuccessful)

0 commit comments

Comments
 (0)
Please sign in to comment.