Skip to content

Commit

Permalink
Fix bug in edit virtual field
Browse files Browse the repository at this point in the history
The index was transformed twice from field index to field origin index,
resulting in a corrupted index (most often being 0 in the end).
  • Loading branch information
m-kuhn committed May 16, 2016
1 parent dd4ae41 commit 28809b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/qgsfieldsproperties.cpp
Expand Up @@ -289,7 +289,7 @@ void QgsFieldsProperties::setRow( int row, int idx, const QgsField& field )
QWidget* expressionWidget = new QWidget;
expressionWidget->setLayout( new QHBoxLayout );
QToolButton* editExpressionButton = new QToolButton;
editExpressionButton->setProperty( "Index", mLayer->fields().fieldOriginIndex( idx ) );
editExpressionButton->setProperty( "Index", idx );
editExpressionButton->setIcon( QgsApplication::getThemeIcon( "/mIconExpression.svg" ) );
connect( editExpressionButton, SIGNAL( clicked() ), this, SLOT( updateExpression() ) );
expressionWidget->layout()->setContentsMargins( 0, 0, 0, 0 );
Expand Down

0 comments on commit 28809b6

Please sign in to comment.