Skip to content

Commit

Permalink
remove model validity condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Koyaani authored and github-actions[bot] committed Nov 2, 2021
1 parent ffd89ef commit 613810c
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions python/plugins/processing/modeler/EditModelAction.py
Expand Up @@ -40,13 +40,9 @@ def isEnabled(self):

def execute(self):
alg = self.itemData
ok, msg = alg.canExecute()
if not ok:
iface.messageBar().pushMessage(QCoreApplication.translate('EditModelAction', 'Cannot edit model: {}').format(msg), level=Qgis.Warning)
else:
dlg = ModelerDialog.create(alg)
dlg.update_model.connect(self.updateModel)
dlg.show()
dlg = ModelerDialog.create(alg)
dlg.update_model.connect(self.updateModel)
dlg.show()

def updateModel(self):
QgsApplication.processingRegistry().providerById('model').refreshAlgorithms()

0 comments on commit 613810c

Please sign in to comment.