Skip to content
Permalink
Browse files
Fix combo name in fielc calc bar
  • Loading branch information
NathanW2 committed May 22, 2014
1 parent c234a09 commit d8f6fd0ff79a5c1e7c4233ff6f34d51ea68f9da5
Showing with 4 additions and 3 deletions.
  1. +3 −2 src/app/qgsattributetabledialog.cpp
  2. +1 −1 src/ui/qgsattributetabledialog.ui
@@ -157,6 +157,7 @@ QgsAttributeTableDialog::QgsAttributeTableDialog( QgsVectorLayer *theLayer, QWid
mAttributeViewButton->setIcon( QgsApplication::getThemeIcon( "/mActionPropertyItem.png" ) );
mExpressionSelectButton->setIcon( QgsApplication::getThemeIcon( "/mIconExpressionSelect.svg" ) );
mAddFeature->setIcon( QgsApplication::getThemeIcon( "/mActionNewTableRow.png" ) );
mOpenExpressionWidget->setIcon( QgsApplication::getThemeIcon( "/mIconExpression.svg" ) );

// toggle editing
bool canChangeAttributes = mLayer->dataProvider()->capabilities() & QgsVectorDataProvider::ChangeAttributeValues;
@@ -203,7 +204,7 @@ QgsAttributeTableDialog::QgsAttributeTableDialog( QgsVectorLayer *theLayer, QWid

mFieldModel = new QgsFieldModel();
mFieldModel->setLayer( mLayer );
mFieldComboButton->setModel( mFieldModel );
mFieldCombo->setModel( mFieldModel );
connect( mOpenExpressionWidget, SIGNAL( clicked() ), this, SLOT( openExpressionBuilder() ) );
connect( mRunFieldCalc, SIGNAL( clicked() ), this, SLOT( updateFieldFromExpression() ) );
editingToggled();
@@ -294,7 +295,7 @@ void QgsAttributeTableDialog::updateFieldFromExpression()

mLayer->beginEditCommand( "Field calculator" );

QModelIndex modelindex = mFieldModel->indexFromName( mFieldComboButton->currentText() );
QModelIndex modelindex = mFieldModel->indexFromName( mFieldCombo->currentText() );
int fieldindex = modelindex.data( QgsFieldModel::FieldIndexRole ).toInt();

bool calculationSuccess = true;
@@ -551,7 +551,7 @@
<number>1</number>
</property>
<item>
<widget class="QComboBox" name="mFieldComboButton"/>
<widget class="QComboBox" name="mFieldCombo"/>
</item>
<item>
<widget class="QLabel" name="label">

0 comments on commit d8f6fd0

Please sign in to comment.