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 b514f52 commit c0214bc
Showing 1 changed file with 1 addition and 1 deletion.
@@ -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 );

0 comments on commit c0214bc

Please sign in to comment.