Skip to content
Permalink
Browse files

[processing] Show a message bar success message after running an

in-place alg if no parameter dialog is shown

Allows users to know that the algorithm has actually run in case
there's no visible changes
  • Loading branch information
nyalldawson committed Sep 17, 2018
1 parent f514875 commit bfc5a1754f8847f547ac1b7918b175e02f107f39
Showing with 7 additions and 2 deletions.
  1. +7 −2 python/plugins/processing/gui/ProcessingToolbox.py
@@ -231,7 +231,12 @@ def executeAlgorithm(self):

if self.in_place_mode and not [d for d in alg.parameterDefinitions() if d.name() not in ('INPUT', 'OUTPUT')]:
parameters = {}
execute_in_place(alg, parameters)
feedback = MessageBarProgress(algname=alg.displayName())
ok, results = execute_in_place(alg, parameters, feedback=feedback)
if ok:
iface.messageBar().pushSuccess('', self.tr('{} complete').format(alg.displayName()))
feedback.close()
# MessageBarProgress handles errors
return

if alg.countVisibleParameters() > 0:
@@ -250,7 +255,7 @@ def executeAlgorithm(self):
pass
canvas.setMapTool(prevMapTool)
else:
feedback = MessageBarProgress()
feedback = MessageBarProgress(algname=alg.displayName())
context = dataobjects.createContext(feedback)
parameters = {}
ret, results = execute(alg, parameters, context, feedback)

0 comments on commit bfc5a17

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