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 b514f52 commit c0214bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/qgsfieldsproperties.cpp
Expand Up @@ -291,7 +291,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 c0214bc

Please sign in to comment.