Skip to content
Permalink
Browse files

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
  • Loading branch information
signedav authored and nyalldawson committed Oct 24, 2018
1 parent 6526dd0 commit b1505549353366b25776fa69afec0f572621d0e2
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/gui/qgsattributeform.cpp
@@ -268,9 +268,13 @@ void QgsAttributeForm::setFeature( const QgsFeature &feature )
}
break;
}
case QgsAttributeEditorContext::MultiEditMode:
case QgsAttributeEditorContext::SearchMode:
case QgsAttributeEditorContext::AggregateSearchMode:
{
resetValues();
break;
}
case QgsAttributeEditorContext::MultiEditMode:
{
//ignore setFeature
break;

0 comments on commit b150554

Please sign in to comment.
You can’t perform that action at this time.