openFeatureForm: Update attributes on provided when used modal

Fix #11099
This commit is contained in:
Matthias Kuhn 2014-08-26 16:06:15 +02:00
parent 956f80ee03
commit 4b8288c026
2 changed files with 7 additions and 1 deletions

View File

@ -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
{

View File

@ -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();
}