Skip to content
Permalink
Browse files
copy model only when no error
  • Loading branch information
Koyaani authored and nyalldawson committed Nov 2, 2021
1 parent 93fc612 commit 24e334419267fda9285fe9ad36092abcd1122090
Showing with 3 additions and 2 deletions.
  1. +3 −2 python/plugins/processing/modeler/AddModelFromFileAction.py
@@ -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 24e3344

Please sign in to comment.