Skip to content
Permalink
Browse files

[processing] When running an algorithm in place mode, don't auto close

the dialog after changing features

Otherwise it can be a real pain to iteratively change/undo/tweak parameter
value
  • Loading branch information
nyalldawson committed Mar 6, 2020
1 parent 4e1e684 commit bc3077e52eb8ef8a4ff9b45211dee89dd01ae090
Showing with 4 additions and 7 deletions.
  1. +4 −7 python/plugins/processing/gui/AlgorithmDialog.py
@@ -259,10 +259,7 @@ def on_complete(ok, results):

self.cancelButton().setEnabled(False)

if not self.in_place:
self.finish(ok, results, self.context, self.feedback)
elif ok:
self.close()
self.finish(ok, results, self.context, self.feedback, in_place=self.in_place)

self.feedback = None
self.context = None
@@ -316,10 +313,10 @@ def on_complete(ok, results):
self.messageBar().pushMessage("", e.message,
level=Qgis.Warning, duration=5)

def finish(self, successful, result, context, feedback):
def finish(self, successful, result, context, feedback, in_place=False):
keepOpen = not successful or ProcessingConfig.getSetting(ProcessingConfig.KEEP_DIALOG_OPEN)

if self.iterateParam is None:
if not in_place and self.iterateParam is None:

# add html results to results dock
for out in self.algorithm().outputDefinitions():
@@ -334,7 +331,7 @@ def finish(self, successful, result, context, feedback):
self.setResults(result)
self.setInfo(self.tr('Algorithm \'{0}\' finished').format(self.algorithm().displayName()), escapeHtml=False)

if not keepOpen:
if not in_place and not keepOpen:
self.close()
else:
self.resetGui()

0 comments on commit bc3077e

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