Skip to content

Commit

Permalink
Fix checking if Processing is enabled. (Hopefully) fixes 3liz#422
Browse files Browse the repository at this point in the history
  • Loading branch information
borysiasty committed Dec 16, 2024
1 parent 17f35fc commit 3e6496f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion QuickOSM/core/utilities/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from typing import Tuple

from qgis.core import QgsApplication, QgsSettings
import qgis.utils
from qgis.PyQt.QtCore import QDir

__copyright__ = 'Copyright 2021, 3Liz'
Expand Down Expand Up @@ -82,7 +83,7 @@ def check_processing_enable() -> Tuple[bool, str, str]:
""" Check if Processing is enabled. """
# https://github.com/3liz/QuickOSM/issues/422
# https://github.com/3liz/QuickOSM/issues/352
if QgsApplication.processingRegistry().algorithmById("native:buffer"):
if 'processing' in qgis.utils.plugins:
return True, '', ''

return (
Expand Down
3 changes: 2 additions & 1 deletion QuickOSM/quick_osm.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,8 @@ def open_dialog(self):
# https://github.com/3liz/QuickOSM/issues/422
flag, title, error = check_processing_enable()
if not flag:
error_dialog = QMessageBox(QMessageBox.Critical, title, error, QMessageBox.Ok, self)
error_dialog = QMessageBox(QMessageBox.Critical, title, error, QMessageBox.Ok,
self.iface.mainWindow())
error_dialog.exec()
return

Expand Down

0 comments on commit 3e6496f

Please sign in to comment.