Skip to content
Permalink
Browse files
[processing] reset variables list in field calculator on layer change (
…fix #15633)
  • Loading branch information
alexbruy committed May 4, 2017
1 parent eda1730 commit c2699b464057e2579b9852b02d8f8d5e3014f0de
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 c2699b4

Please sign in to comment.