Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix checking if the Processing Plugin is enabled #517

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading