mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
[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
This commit is contained in:
parent
325f2a4622
commit
d43f1a2823
@ -621,10 +621,9 @@ class ModelerDialog(BASE, WIDGET):
|
|||||||
self.bar.pushMessage("", self.tr("Model was correctly exported as python script"), level=Qgis.Success, duration=5)
|
self.bar.pushMessage("", self.tr("Model was correctly exported as python script"), level=Qgis.Success, duration=5)
|
||||||
|
|
||||||
def saveModel(self, saveAs):
|
def saveModel(self, saveAs):
|
||||||
if str(self.textGroup.text()).strip() == '' \
|
if str(self.textName.text()).strip() == '':
|
||||||
or str(self.textName.text()).strip() == '':
|
self.bar.pushWarning(
|
||||||
QMessageBox.warning(
|
"", self.tr('Please a enter model name before saving')
|
||||||
self, self.tr('Warning'), self.tr('Please enter group and model names before saving')
|
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
self.model.setName(str(self.textName.text()))
|
self.model.setName(str(self.textName.text()))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user