Skip to content
Permalink
Browse files

[processing] fixed add model from file

fixes #12902
  • Loading branch information
volaya committed Jun 22, 2015
1 parent 5013bb5 commit b6975d61214a9383c220787bbd65f7628613f68e
Showing with 2 additions and 1 deletion.
  1. +2 −1 python/plugins/processing/modeler/AddModelFromFileAction.py
@@ -55,7 +55,7 @@ def execute(self):
if filename:
try:
settings.setValue('Processing/lastModelsDir',
QFileInfo(fileName).absoluteDir().absolutePath())
QFileInfo(filename).absoluteDir().absolutePath())

ModelerAlgorithm.fromFile(filename)
except WrongModelException:
@@ -68,6 +68,7 @@ def execute(self):
QMessageBox.warning(self.toolbox,
self.tr('Error reading model', 'AddModelFromFileAction'),
self.tr('Cannot read file', 'AddModelFromFileAction'))
return
destFilename = os.path.join(ModelerUtils.modelsFolder(), os.path.basename(filename))
shutil.copyfile(filename,destFilename)
self.toolbox.updateProvider('model')

0 comments on commit b6975d6

Please sign in to comment.
You can’t perform that action at this time.