Skip to content

Commit

Permalink
Merge pull request #517 from borysiasty/fix-422
Browse files Browse the repository at this point in the history
Fix checking if the Processing Plugin is enabled
  • Loading branch information
Gustry authored Jan 6, 2025
2 parents ee25e94 + 3d595c9 commit 263c060
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion QuickOSM/core/utilities/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
from os.path import abspath, isdir, isfile, join
from typing import Tuple

import qgis.utils

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

Expand Down Expand Up @@ -82,7 +84,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 263c060

Please sign in to comment.