Skip to content

Commit

Permalink
Fix running processing algs through locator
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jun 11, 2017
1 parent f5a0243 commit be2ec2f
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions python/plugins/processing/gui/AlgorithmLocatorFilter.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,16 @@ def fetchResults(self, string, context, feedback):
self.resultFetched.emit(result)

def triggerResult(self, result):
a = QgsApplication.processingRegistry().algorithmById(result.userData)
if a:
alg = a.getCopy()
message = alg.checkBeforeOpeningParametersDialog()
if message:
alg = QgsApplication.processingRegistry().algorithmById(result.userData)
if alg:
ok, message = alg.canExecute()
if not ok:
dlg = MessageDialog()
dlg.setTitle(self.tr('Missing dependency'))
dlg.setMessage(message)
dlg.exec_()
return
dlg = alg.getCustomParametersDialog()
dlg = alg.createCustomParametersWidget()
if not dlg:
dlg = AlgorithmDialog(alg)
canvas = iface.mapCanvas()
Expand Down

0 comments on commit be2ec2f

Please sign in to comment.