Skip to content

Commit 4b8288c

Browse files
committedAug 26, 2014
openFeatureForm: Update attributes on provided when used modal
Fix #11099
1 parent 956f80e commit 4b8288c

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed
 

‎src/app/qgsfeatureaction.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,10 @@ bool QgsFeatureAction::editFeature( bool showModal )
115115
if ( showModal )
116116
{
117117
dialog->setAttribute( Qt::WA_DeleteOnClose );
118-
return dialog->exec();
118+
int rv = dialog->exec();
119+
120+
mFeature.setAttributes( dialog->feature()->attributes() );
121+
return rv;
119122
}
120123
else
121124
{

‎src/gui/qgsattributeform.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,10 @@ bool QgsAttributeForm::save()
190190
mLayer->beginEditCommand( mEditCommandMessage );
191191
bool res = mLayer->addFeature( updatedFeature );
192192
if ( res )
193+
{
194+
mFeature.setAttributes( updatedFeature.attributes() );
193195
mLayer->endEditCommand();
196+
}
194197
else
195198
mLayer->destroyEditCommand();
196199
}

0 commit comments

Comments
 (0)
Please sign in to comment.