Skip to content
Permalink
Browse files

Fix QgsFieldExpressionWidget generates an invalid expression if a

field name with a space is selected from the dropdown list and then
the expression editor button is clicked

Previously, the expression editor would open with an unquoted field
name, which was broken for field names containing spaces. Now, we
always ensure that the editor opens with a valid expression
  • Loading branch information
nyalldawson committed Jul 23, 2020
1 parent ea74e86 commit e859a0f846cc39466233e88790873f1a36139f2b
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/gui/qgsfieldexpressionwidget.cpp
@@ -230,7 +230,7 @@ void QgsFieldExpressionWidget::setExpression( const QString &expression )

void QgsFieldExpressionWidget::editExpression()
{
QString currentExpression = currentText();
QString currentExpression = asExpression();
QgsVectorLayer *vl = layer();

QgsExpressionContext context = mExpressionContextGenerator ? mExpressionContextGenerator->createExpressionContext() : mExpressionContext;

0 comments on commit e859a0f

Please sign in to comment.
You can’t perform that action at this time.