Skip to content
Permalink
Browse files

[processing] Remove hack

  • Loading branch information
nyalldawson committed Oct 2, 2018
1 parent c8bf6db commit 68dee5b17fd502736dbdbb7190fcffcda86cd49e
Showing with 5 additions and 3 deletions.
  1. +5 −3 python/plugins/processing/gui/AlgorithmLocatorFilter.py
@@ -35,6 +35,7 @@
QgsWkbTypes,
QgsMapLayer,
QgsFields)
from processing.gui.MessageBarProgress import MessageBarProgress
from processing.gui.MessageDialog import MessageDialog
from processing.gui.AlgorithmDialog import AlgorithmDialog
from processing.gui.AlgorithmExecutor import execute_in_place
@@ -170,8 +171,8 @@ def triggerResult(self, result):
dlg.exec_()
return

if len(alg.parameterDefinitions()) > 2:
# hack!!
if [d for d in alg.parameterDefinitions() if
d.name() not in ('INPUT', 'OUTPUT')]:
dlg = alg.createCustomParametersWidget(None)
if not dlg:
dlg = AlgorithmDialog(alg, True)
@@ -186,5 +187,6 @@ def triggerResult(self, result):
pass
canvas.setMapTool(prevMapTool)
else:
feedback = MessageBarProgress(algname=alg.displayName())
parameters = {}
execute_in_place(alg, parameters)
execute_in_place(alg, parameters, feedback=feedback)

0 comments on commit 68dee5b

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