mirror of
https://github.com/qgis/QGIS.git
synced 2025-12-07 00:03:52 -05:00
[processing] If an error occurs while running an algorith, always
keep the algorithm dialog open after execution Otherwise it's hard to see the error - you have to know to check the python log. Keeping the dialog open at the log makes the error immediately visible to the user
This commit is contained in:
parent
16629b406b
commit
a64d199e6f
@ -229,7 +229,7 @@ class AlgorithmDialog(AlgorithmDialogBase):
|
|||||||
feedback.pushInfo(
|
feedback.pushInfo(
|
||||||
self.tr('Execution completed in {0:0.2f} seconds'.format(time.time() - start_time)))
|
self.tr('Execution completed in {0:0.2f} seconds'.format(time.time() - start_time)))
|
||||||
self.buttonCancel.setEnabled(False)
|
self.buttonCancel.setEnabled(False)
|
||||||
self.finish(parameters, context, feedback)
|
self.finish(True, parameters, context, feedback)
|
||||||
else:
|
else:
|
||||||
self.buttonCancel.setEnabled(False)
|
self.buttonCancel.setEnabled(False)
|
||||||
self.resetGUI()
|
self.resetGUI()
|
||||||
@ -250,7 +250,7 @@ class AlgorithmDialog(AlgorithmDialogBase):
|
|||||||
feedback.pushInfo('')
|
feedback.pushInfo('')
|
||||||
|
|
||||||
self.buttonCancel.setEnabled(False)
|
self.buttonCancel.setEnabled(False)
|
||||||
self.finish(results, context, feedback)
|
self.finish(ok, results, context, feedback)
|
||||||
|
|
||||||
task = QgsProcessingAlgRunnerTask(self.alg, parameters, context, feedback)
|
task = QgsProcessingAlgRunnerTask(self.alg, parameters, context, feedback)
|
||||||
task.executed.connect(on_complete)
|
task.executed.connect(on_complete)
|
||||||
@ -269,8 +269,8 @@ class AlgorithmDialog(AlgorithmDialogBase):
|
|||||||
self.bar.pushMessage("", self.tr("Wrong or missing parameter value: {0}").format(e.parameter.description()),
|
self.bar.pushMessage("", self.tr("Wrong or missing parameter value: {0}").format(e.parameter.description()),
|
||||||
level=QgsMessageBar.WARNING, duration=5)
|
level=QgsMessageBar.WARNING, duration=5)
|
||||||
|
|
||||||
def finish(self, result, context, feedback):
|
def finish(self, successful, result, context, feedback):
|
||||||
keepOpen = ProcessingConfig.getSetting(ProcessingConfig.KEEP_DIALOG_OPEN)
|
keepOpen = not successful or ProcessingConfig.getSetting(ProcessingConfig.KEEP_DIALOG_OPEN)
|
||||||
|
|
||||||
if self.iterateParam is None:
|
if self.iterateParam is None:
|
||||||
|
|
||||||
|
|||||||
@ -238,7 +238,7 @@ class AlgorithmDialogBase(BASE, WIDGET):
|
|||||||
self._saveGeometry()
|
self._saveGeometry()
|
||||||
super(AlgorithmDialogBase, self).reject()
|
super(AlgorithmDialogBase, self).reject()
|
||||||
|
|
||||||
def finish(self, context, feedback):
|
def finish(self, successful, result, context, feedback):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def toggleCollapsed(self):
|
def toggleCollapsed(self):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user