From 418d58752fb34820d5004448e6be8f4fa8e7220c Mon Sep 17 00:00:00 2001 From: volaya Date: Mon, 15 Jan 2018 14:56:36 +0100 Subject: [PATCH] [processing] added missing method to custom field calculator dialog A much better way of doing this would be to have the dialog extend qgsprocessingalgorithmdialogbase, or to take an approach like the one used in the raster calculator, with wrapper widgets. This is just a patch, since that option might require a larger amount of work. --- .../processing/algs/qgis/ui/FieldsCalculatorDialog.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python/plugins/processing/algs/qgis/ui/FieldsCalculatorDialog.py b/python/plugins/processing/algs/qgis/ui/FieldsCalculatorDialog.py index 91a8ec1b8db5..16baa3a138d8 100644 --- a/python/plugins/processing/algs/qgis/ui/FieldsCalculatorDialog.py +++ b/python/plugins/processing/algs/qgis/ui/FieldsCalculatorDialog.py @@ -77,6 +77,7 @@ def __init__(self, alg): self.setupUi(self) self.executed = False + self._wasExecuted = False self.alg = alg self.layer = None @@ -244,6 +245,7 @@ def accept(self): context, self.feedback, not keepOpen) + self._wasExecuted = self.executed or self._wasExecuted if not keepOpen: QDialog.reject(self) @@ -257,3 +259,6 @@ def setPercentage(self, i): def error(self, text): QMessageBox.critical(self, "Error", text) QgsMessageLog.logMessage(text, self.tr('Processing'), QgsMessageLog.CRITICAL) + + def wasExecuted(self): + return self._wasExecuted