Skip to content
Permalink
Browse files

[MetaSearch] fix Python error when adding resources (#35560)

  • Loading branch information
tomkralidis authored and nyalldawson committed Jul 7, 2020
1 parent 44ebe86 commit 6f859c5744e5ee4087e0a11253f0cd81f336b0c9
Showing with 6 additions and 3 deletions.
  1. +6 −3 python/plugins/MetaSearch/dialogs/maindialog.py
@@ -41,7 +41,7 @@
from qgis.core import (QgsApplication, QgsCoordinateReferenceSystem,
QgsCoordinateTransform, QgsGeometry, QgsPointXY,
QgsProviderRegistry, QgsSettings, QgsProject)
from qgis.gui import QgsRubberBand
from qgis.gui import QgsRubberBand, QgsGui
from qgis.utils import OverrideCursor

with warnings.catch_warnings():
@@ -754,8 +754,11 @@ def add_to_ows(self):
self.settings.endGroup()

# open provider window
ows_provider = QgsProviderRegistry.instance().createSelectionWidget(stype[2],
self)
ows_provider = QgsGui.sourceSelectProviderRegistry().createSelectionWidget(
stype[2],
self,
Qt.Widget,
QgsProviderRegistry.WidgetMode.Embedded)
service_type = stype[0]

# connect dialog signals to iface slots

0 comments on commit 6f859c5

Please sign in to comment.
You can’t perform that action at this time.