Skip to content

Commit

Permalink
[processing]correctly update toolbox after editing/creating/deleting …
Browse files Browse the repository at this point in the history
…models and scripts
  • Loading branch information
volaya committed Apr 19, 2014
1 parent 4c08528 commit 7ae6a63
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
5 changes: 4 additions & 1 deletion python/plugins/processing/gui/CreateNewScriptAction.py
Expand Up @@ -55,4 +55,7 @@ def execute(self):
dlg.show()
dlg.exec_()
if dlg.update:
self.toolbox.updateProvider('model')
if self.scriptType == self.SCRIPT_PYTHON:
self.toolbox.updateProvider('script')
elif self.scriptType == self.SCRIPT_R:
self.toolbox.updateProvider('r')
5 changes: 4 additions & 1 deletion python/plugins/processing/gui/DeleteScriptAction.py
Expand Up @@ -57,4 +57,7 @@ def execute(self, alg):
QMessageBox.No)
if reply == QMessageBox.Yes:
os.remove(self.alg.descriptionFile)
self.toolbox.updateTree()
if self.scriptType == self.SCRIPT_PYTHON:
self.toolbox.updateProvider('script')
elif self.scriptType == self.SCRIPT_R:
self.toolbox.updateProvider('r')
6 changes: 5 additions & 1 deletion python/plugins/processing/gui/EditScriptAction.py
Expand Up @@ -51,4 +51,8 @@ def execute(self):
dlg.show()
dlg.exec_()
if dlg.update:
self.toolbox.updateTree()
if self.scriptType == ScriptEditorDialog.SCRIPT_PYTHON:
self.toolbox.updateProvider('script')
elif self.scriptType == ScriptEditorDialog.SCRIPT_R:
self.toolbox.updateProvider('r')

2 changes: 1 addition & 1 deletion python/plugins/processing/modeler/DeleteModelAction.py
Expand Up @@ -46,4 +46,4 @@ def execute(self):
QtGui.QMessageBox.No)
if reply == QtGui.QMessageBox.Yes:
os.remove(self.alg.descriptionFile)
self.updateToolbox()
self.toolbox.updateProvider('model')
2 changes: 1 addition & 1 deletion python/plugins/processing/modeler/EditModelAction.py
Expand Up @@ -41,4 +41,4 @@ def execute(self):
dlg = ModelerDialog(self.alg.getCopy())
dlg.exec_()
if dlg.update:
self.updateToolbox()
self.toolbox.updateProvider('model')

0 comments on commit 7ae6a63

Please sign in to comment.