We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
qgis
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent 5013bb5 commit b6975d6Copy full SHA for b6975d6
python/plugins/processing/modeler/AddModelFromFileAction.py
@@ -55,7 +55,7 @@ def execute(self):
55
if filename:
56
try:
57
settings.setValue('Processing/lastModelsDir',
58
- QFileInfo(fileName).absoluteDir().absolutePath())
+ QFileInfo(filename).absoluteDir().absolutePath())
59
60
ModelerAlgorithm.fromFile(filename)
61
except WrongModelException:
@@ -68,6 +68,7 @@ def execute(self):
68
QMessageBox.warning(self.toolbox,
69
self.tr('Error reading model', 'AddModelFromFileAction'),
70
self.tr('Cannot read file', 'AddModelFromFileAction'))
71
+ return
72
destFilename = os.path.join(ModelerUtils.modelsFolder(), os.path.basename(filename))
73
shutil.copyfile(filename,destFilename)
74
self.toolbox.updateProvider('model')
0 commit comments