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 28809b6
Showing 1 changed file with 1 addition and 1 deletion.
@@ -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.