Skip to content

Commit

Permalink
copy model only when no error
Browse files Browse the repository at this point in the history
  • Loading branch information
Koyaani authored and nyalldawson committed Nov 2, 2021
1 parent d2425f5 commit 9272035
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/plugins/processing/modeler/AddModelFromFileAction.py
Expand Up @@ -77,7 +77,8 @@ def execute(self):
QMessageBox.Yes | QMessageBox.No,
QMessageBox.No)

if reply == QMessageBox.Yes:
shutil.copyfile(filename, destFilename)
if reply == QMessageBox.No:
return

shutil.copyfile(filename, destFilename)
QgsApplication.processingRegistry().providerById('model').refreshAlgorithms()

0 comments on commit 9272035

Please sign in to comment.