Skip to content
Browse files

backport sorted field list issues

If the field list is sorted by name, the touched functions
should take into consideration the sorted list IDs instead of the unsorted one.
  • Loading branch information
tudorbarascu authored and m-kuhn committed Feb 1, 2017
1 parent 467d66a commit 5ddc536a6f609ba22877ee7e251c30c2a4e7d922
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/app/qgsfieldsproperties.cpp
@@ -987,11 +987,11 @@ void QgsFieldsProperties::apply()
int idx = mFieldsList->item( i, attrIdCol )->text().toInt();
FieldConfig cfg = configForRow( i );

mLayer->editFormConfig()->setReadOnly( i, !cfg.mEditable );
mLayer->editFormConfig()->setLabelOnTop( i, cfg.mLabelOnTop );
mLayer->editFormConfig()->setNotNull( i, cfg.mNotNull );
mLayer->editFormConfig()->setExpressionDescription( i, cfg.mConstraintDescription );
mLayer->editFormConfig()->setExpression( i, cfg.mConstraint );
mLayer->editFormConfig()->setReadOnly( idx, !cfg.mEditable );
mLayer->editFormConfig()->setLabelOnTop( idx, cfg.mLabelOnTop );
mLayer->editFormConfig()->setNotNull( idx, cfg.mNotNull );
mLayer->editFormConfig()->setExpressionDescription( idx, cfg.mConstraintDescription );
mLayer->editFormConfig()->setExpression( idx, cfg.mConstraint );

mLayer->editFormConfig()->setWidgetType( idx, cfg.mEditorWidgetV2Type );
mLayer->editFormConfig()->setWidgetConfig( idx, cfg.mEditorWidgetV2Config );

0 comments on commit 5ddc536

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