Skip to content

Commit 805739c

Browse files
committed
Fix field calc bar error when setting to field name with spaces
(cherry-picked from a4ed8e0)
1 parent 0760e30 commit 805739c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/app/qgsattributetabledialog.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,13 +343,13 @@ void QgsAttributeTableDialog::updateFieldFromExpression()
343343
{
344344
bool filtered = mMainView->filterMode() != QgsAttributeTableFilterModel::ShowAll;
345345
QgsFeatureIds filteredIds = filtered ? mMainView->filteredFeatures() : QgsFeatureIds();
346-
runFieldCalculation( mLayer, mFieldCombo->currentText(), mUpdateExpressionText->currentField(), filteredIds );
346+
runFieldCalculation( mLayer, mFieldCombo->currentText(), mUpdateExpressionText->asExpression(), filteredIds );
347347
}
348348

349349
void QgsAttributeTableDialog::updateFieldFromExpressionSelected()
350350
{
351351
QgsFeatureIds filteredIds = mLayer->selectedFeaturesIds();
352-
runFieldCalculation( mLayer, mFieldCombo->currentText(), mUpdateExpressionText->currentField(), filteredIds );
352+
runFieldCalculation( mLayer, mFieldCombo->currentText(), mUpdateExpressionText->asExpression(), filteredIds );
353353
}
354354

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

0 commit comments

Comments
 (0)