Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix field calc bar error when setting to field name with spaces
(cherry-picked from a4ed8e0)
  • Loading branch information
nyalldawson committed Apr 4, 2016
1 parent 0760e30 commit 805739c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/qgsattributetabledialog.cpp
Expand Up @@ -343,13 +343,13 @@ void QgsAttributeTableDialog::updateFieldFromExpression()
{
bool filtered = mMainView->filterMode() != QgsAttributeTableFilterModel::ShowAll;
QgsFeatureIds filteredIds = filtered ? mMainView->filteredFeatures() : QgsFeatureIds();
runFieldCalculation( mLayer, mFieldCombo->currentText(), mUpdateExpressionText->currentField(), filteredIds );
runFieldCalculation( mLayer, mFieldCombo->currentText(), mUpdateExpressionText->asExpression(), filteredIds );
}

void QgsAttributeTableDialog::updateFieldFromExpressionSelected()
{
QgsFeatureIds filteredIds = mLayer->selectedFeaturesIds();
runFieldCalculation( mLayer, mFieldCombo->currentText(), mUpdateExpressionText->currentField(), filteredIds );
runFieldCalculation( mLayer, mFieldCombo->currentText(), mUpdateExpressionText->asExpression(), filteredIds );
}

void QgsAttributeTableDialog::runFieldCalculation( QgsVectorLayer* layer, const QString& fieldName, const QString& expression, const QgsFeatureIds& filteredIds )
Expand Down

0 comments on commit 805739c

Please sign in to comment.