Skip to content
Permalink
Browse files

[processing] more checks before running model

  • Loading branch information
volaya committed Jan 19, 2016
1 parent 4b079ae commit f7623808359b43d42e1c4dad95d1f8feb7c9b07a
@@ -222,9 +222,9 @@ def executeAlgorithm(self):
message = alg.checkBeforeOpeningParametersDialog()
if message:
dlg = MessageDialog()
dlg.setTitle(self.tr('Missing dependency'))
dlg.setTitle(self.tr('Error executing algorithm'))
dlg.setMessage(
self.tr('<h3>Missing dependency. This algorithm cannot '
self.tr('<h3>This algorithm cannot '
'be run :-( </h3>\n%s') % message)
dlg.exec_()
return
@@ -511,6 +511,12 @@ def commandLineName(self):
else:
return 'modeler:' + os.path.basename(self.descriptionFile)[:-6].lower()

def checkBeforeOpeningParametersDialog(self):
for alg in self.algs.values():
algInstance = ModelerUtils.getAlgorithm(alg.consoleName)
if algInstance is None:
return "The model you are trying to run contains an algorithm that is not available: <i>%s</i>" % alg.consoleName

def setModelerView(self, dialog):
self.modelerdialog = dialog

0 comments on commit f762380

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