Skip to content
Permalink
Browse files
Merge pull request #4499 from alexbruy/processing-fieldcalc
[processing] reset variables list in field calculator on layer change  (fix #15633)
  • Loading branch information
alexbruy committed May 5, 2017
2 parents 41dd2e7 + c2699b4 commit 9c88faf416dd7f0456c7136d13fe03b82968d2dd
Showing with 3 additions and 3 deletions.
  1. +2 −1 python/plugins/processing/algs/qgis/ui/FieldsCalculatorDialog.py
  2. +1 −2 src/gui/qgsexpressionbuilderwidget.cpp
@@ -105,7 +105,6 @@ def manageGui(self):
self.mOutputFieldTypeComboBox.blockSignals(False)
self.builder.loadRecent('fieldcalc')

self.initContext()
self.updateLayer(self.cmbInputLayer.currentLayer())

def initContext(self):
@@ -117,6 +116,8 @@ def initContext(self):

def updateLayer(self, layer):
self.layer = layer

self.initContext()
self.builder.setLayer(self.layer)
self.builder.loadFieldNames()
self.populateFields()
@@ -516,8 +516,7 @@ void QgsExpressionBuilderWidget::setExpressionText( const QString &expression )
void QgsExpressionBuilderWidget::setExpressionContext( const QgsExpressionContext &context )
{
mExpressionContext = context;

loadExpressionContext();
updateFunctionTree();
}

void QgsExpressionBuilderWidget::on_txtExpressionString_textChanged()

0 comments on commit 9c88faf

Please sign in to comment.