mirror of
https://github.com/qgis/QGIS.git
synced 2025-11-15 00:06:49 -05:00
Fix running processing algs through locator
This commit is contained in:
parent
f5a0243c9d
commit
be2ec2f1a7
@ -72,17 +72,16 @@ class AlgorithmLocatorFilter(QgsLocatorFilter):
|
|||||||
self.resultFetched.emit(result)
|
self.resultFetched.emit(result)
|
||||||
|
|
||||||
def triggerResult(self, result):
|
def triggerResult(self, result):
|
||||||
a = QgsApplication.processingRegistry().algorithmById(result.userData)
|
alg = QgsApplication.processingRegistry().algorithmById(result.userData)
|
||||||
if a:
|
if alg:
|
||||||
alg = a.getCopy()
|
ok, message = alg.canExecute()
|
||||||
message = alg.checkBeforeOpeningParametersDialog()
|
if not ok:
|
||||||
if message:
|
|
||||||
dlg = MessageDialog()
|
dlg = MessageDialog()
|
||||||
dlg.setTitle(self.tr('Missing dependency'))
|
dlg.setTitle(self.tr('Missing dependency'))
|
||||||
dlg.setMessage(message)
|
dlg.setMessage(message)
|
||||||
dlg.exec_()
|
dlg.exec_()
|
||||||
return
|
return
|
||||||
dlg = alg.getCustomParametersDialog()
|
dlg = alg.createCustomParametersWidget()
|
||||||
if not dlg:
|
if not dlg:
|
||||||
dlg = AlgorithmDialog(alg)
|
dlg = AlgorithmDialog(alg)
|
||||||
canvas = iface.mapCanvas()
|
canvas = iface.mapCanvas()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user