Skip to content

Commit

Permalink
fix labelontop/editable when field list sorted
Browse files Browse the repository at this point in the history
  • Loading branch information
tudorbarascu authored and m-kuhn committed Jan 25, 2017
1 parent 21637fd commit 882a80a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/app/qgsfieldsproperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -989,9 +989,9 @@ void QgsFieldsProperties::apply()
QString name = mLayer->fields().at( idx ).name();
FieldConfig cfg = configForRow( i );

editFormConfig.setReadOnly( i, !cfg.mEditable );
editFormConfig.setLabelOnTop( i, cfg.mLabelOnTop );
mLayer->setConstraintExpression( i, cfg.mConstraint, cfg.mConstraintDescription );
editFormConfig.setReadOnly( idx, !cfg.mEditable );
editFormConfig.setLabelOnTop( idx, cfg.mLabelOnTop );
mLayer->setConstraintExpression( idx, cfg.mConstraint, cfg.mConstraintDescription );
mLayer->setEditorWidgetSetup( idx, QgsEditorWidgetSetup( cfg.mEditorWidgetType, cfg.mEditorWidgetConfig ) );

if ( cfg.mConstraints & QgsFieldConstraints::ConstraintNotNull )
Expand Down

0 comments on commit 882a80a

Please sign in to comment.