Skip to content

Commit

Permalink
[processing] Remove hack
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Oct 2, 2018
1 parent c8bf6db commit 68dee5b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions python/plugins/processing/gui/AlgorithmLocatorFilter.py
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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.