[sextante] don't run models without algorithms and/or parameters

This commit is contained in:
Alexander Bruy 2013-04-10 17:37:50 +04:00
parent d247b21be7
commit 4e5c660823

View File

@ -126,6 +126,13 @@ class ModelerDialog(QDialog, Ui_DlgModeler):
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()