Skip to content
Permalink
Browse files

Fix bug in edit virtual field

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 28809b6d673a18b839be27966437b5507731e956
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/app/qgsfieldsproperties.cpp
@@ -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 );

0 comments on commit 28809b6

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