Skip to content

Commit 2185d42

Browse files
committedMay 5, 2017
[processing] reset variables list in field calculator on layer change (fix #15633)
1 parent 0780756 commit 2185d42

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎python/plugins/processing/algs/qgis/ui/FieldsCalculatorDialog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ def manageGui(self):
8989

9090
self.builder.loadRecent('fieldcalc')
9191

92-
self.initContext()
9392
self.updateLayer()
9493

9594
def initContext(self):
@@ -103,6 +102,7 @@ def initContext(self):
103102

104103
def updateLayer(self):
105104
self.layer = dataobjects.getObject(self.cmbInputLayer.currentText())
105+
self.initContext()
106106
self.builder.setLayer(self.layer)
107107
self.builder.loadFieldNames()
108108
self.populateFields()

‎src/gui/qgsexpressionbuilderwidget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ void QgsExpressionBuilderWidget::setExpressionContext( const QgsExpressionContex
514514
{
515515
mExpressionContext = context;
516516

517-
loadExpressionContext();
517+
updateFunctionTree();
518518
}
519519

520520
void QgsExpressionBuilderWidget::on_txtExpressionString_textChanged()

0 commit comments

Comments
 (0)
Please sign in to comment.