Skip to content
Permalink
Browse files

Fix dropping processing script algorithm .py file on QGIS no longer

triggers the algorithm to execute
  • Loading branch information
nyalldawson committed Oct 6, 2020
1 parent 384f6a1 commit 64bf347d7e1d664fc674c5ca602ce6c4bedecdf9
Showing with 2 additions and 3 deletions.
  1. +2 −3 python/utils.py
@@ -826,7 +826,7 @@ def run_script_from_file(filepath):
from qgis.processing import alg
try:
from qgis.core import QgsApplication, QgsProcessingAlgorithm, QgsProcessingFeatureBasedAlgorithm
from processing.gui.AlgorithmDialog import AlgorithmDialog
from qgis.processing import execAlgorithmDialog
_locals = {}
exec(open(filepath.replace("\\\\", "/").encode(sys.getfilesystemencoding())).read(), _locals)
alginstance = None
@@ -840,7 +840,6 @@ def run_script_from_file(filepath):
if alginstance:
alginstance.setProvider(QgsApplication.processingRegistry().providerById("script"))
alginstance.initAlgorithm()
dlg = AlgorithmDialog(alginstance)
dlg.show()
execAlgorithmDialog(alginstance)
except ImportError:
pass

0 comments on commit 64bf347

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