mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
openFeatureForm: Update attributes on provided when used modal
Fix #11099
This commit is contained in:
parent
956f80ee03
commit
4b8288c026
@ -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
|
||||
{
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user