Skip to content
Permalink
Browse files

[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.
  • Loading branch information
volaya committed Jan 15, 2018
1 parent dc99b8b commit 418d58752fb34820d5004448e6be8f4fa8e7220c
Showing with 5 additions and 0 deletions.
  1. +5 −0 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

0 comments on commit 418d587

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