Skip to content

Commit

Permalink
[processing] added missing method to custom field calculator dialog
Browse files Browse the repository at this point in the history
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 418d587
Showing 1 changed file with 5 additions and 0 deletions.
Expand Up @@ -77,6 +77,7 @@ def __init__(self, alg):
self.setupUi(self)

self.executed = False
self._wasExecuted = False
self.alg = alg
self.layer = None

Expand Down Expand Up @@ -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)

Expand All @@ -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.