diff --git a/src/app/qgsfeatureaction.cpp b/src/app/qgsfeatureaction.cpp index 5b51483f0bf..b8fb17af38a 100644 --- a/src/app/qgsfeatureaction.cpp +++ b/src/app/qgsfeatureaction.cpp @@ -115,7 +115,10 @@ bool QgsFeatureAction::editFeature( bool showModal ) if ( showModal ) { dialog->setAttribute( Qt::WA_DeleteOnClose ); - return dialog->exec(); + int rv = dialog->exec(); + + mFeature.setAttributes( dialog->feature()->attributes() ); + return rv; } else { diff --git a/src/gui/qgsattributeform.cpp b/src/gui/qgsattributeform.cpp index 73360fa51d1..a1e4dab8bea 100644 --- a/src/gui/qgsattributeform.cpp +++ b/src/gui/qgsattributeform.cpp @@ -190,7 +190,10 @@ bool QgsAttributeForm::save() mLayer->beginEditCommand( mEditCommandMessage ); bool res = mLayer->addFeature( updatedFeature ); if ( res ) + { + mFeature.setAttributes( updatedFeature.attributes() ); mLayer->endEditCommand(); + } else mLayer->destroyEditCommand(); }