Skip to content

Commit b150554

Browse files
signedavnyalldawson
authored andcommitted
Do not overwrite values in attribute form while SearchMode
Because it can be in SearchMode during editing state, a change of selection in the feature list would overwrite the values of the selected one by the one selected before. This because the widget-values were not resetet for the current feature and are saved. The saving is not avoided, because on edit, and switching to SearchMode and changing selection, the old feature still have to be saved. But it does reset the values of the current widget in SearchMode after changing selection - even if it's not visible by the user - to avoid to have wrong values there. fixes ##17751
1 parent 6526dd0 commit b150554

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/gui/qgsattributeform.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,13 @@ void QgsAttributeForm::setFeature( const QgsFeature &feature )
268268
}
269269
break;
270270
}
271-
case QgsAttributeEditorContext::MultiEditMode:
272271
case QgsAttributeEditorContext::SearchMode:
273272
case QgsAttributeEditorContext::AggregateSearchMode:
273+
{
274+
resetValues();
275+
break;
276+
}
277+
case QgsAttributeEditorContext::MultiEditMode:
274278
{
275279
//ignore setFeature
276280
break;

0 commit comments

Comments
 (0)