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 d2425f5 commit 9272035c4e292064cd2c45e8f6b2d9cfc9fcc181
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 9272035

Please sign in to comment.