Skip to content

Commit

Permalink
[sextante] don't run models without algorithms and/or parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Apr 10, 2013
1 parent d247b21 commit 4e5c660
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions python/plugins/sextante/modeler/ModelerDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,13 @@ def editHelp(self):

def runModel(self):
##TODO: enable alg cloning without saving to file
if (len(self.alg.algs) == 0) or (len(self.algParameters) == 0):
QMessageBox.warning(self,
self.tr("Empty model"),
self.tr("Model doesn't contains any algorithms and/or parameters and can't be executed")
)
return

if self.alg.descriptionFile is None:
self.alg.descriptionFile = SextanteUtils.getTempFilename("model")
text = self.alg.serialize()
Expand Down

0 comments on commit 4e5c660

Please sign in to comment.