Skip to content

Commit d43f1a2

Browse files
committedJul 17, 2018
[processing] Allow models to have no group name set
This is supported by the toolbox now, so relax the requirement that all models have a compulsory group name. If no group is set, the model is shown directly under the Models node in the toolbox. Also switch a warning from message box to message bar
1 parent 325f2a4 commit d43f1a2

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed
 

‎python/plugins/processing/modeler/ModelerDialog.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -621,10 +621,9 @@ def exportAsPython(self):
621621
self.bar.pushMessage("", self.tr("Model was correctly exported as python script"), level=Qgis.Success, duration=5)
622622

623623
def saveModel(self, saveAs):
624-
if str(self.textGroup.text()).strip() == '' \
625-
or str(self.textName.text()).strip() == '':
626-
QMessageBox.warning(
627-
self, self.tr('Warning'), self.tr('Please enter group and model names before saving')
624+
if str(self.textName.text()).strip() == '':
625+
self.bar.pushWarning(
626+
"", self.tr('Please a enter model name before saving')
628627
)
629628
return
630629
self.model.setName(str(self.textName.text()))

0 commit comments

Comments
 (0)
Please sign in to comment.