Skip to content

Commit

Permalink
openFeatureForm: Update attributes on provided when used modal
Browse files Browse the repository at this point in the history
Fix #11099
  • Loading branch information
m-kuhn committed Aug 26, 2014
1 parent 956f80e commit 4b8288c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/qgsfeatureaction.cpp
Expand Up @@ -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
{
Expand Down
3 changes: 3 additions & 0 deletions src/gui/qgsattributeform.cpp
Expand Up @@ -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();
}
Expand Down

0 comments on commit 4b8288c

Please sign in to comment.