Skip to content
Permalink
Browse files

[bugfix] Fix WMS in metasearch

  • Loading branch information
elpaso committed Nov 17, 2017
1 parent 1989111 commit a0639b1a2026ed6a76c268118b98b6be97b50a76
Showing with 7 additions and 7 deletions.
  1. +7 −7 python/plugins/MetaSearch/dialogs/maindialog.py
@@ -696,7 +696,7 @@ def add_to_ows(self):

caller = self.sender().objectName()

# stype = human name,/Qgis/connections-%s,providername
# stype = human name,/qgis/connections-%s,providername
if caller == 'mActionAddWms':
stype = ['OGC:WMS/OGC:WMTS', 'wms', 'wms']
data_url = item_data['wms']
@@ -718,9 +718,9 @@ def add_to_ows(self):
# store connection
# check if there is a connection with same name
if caller in ['mActionAddAms', 'mActionAddAfs']:
self.settings.beginGroup('/Qgis/connections-%s' % stype[2])
self.settings.beginGroup('/qgis/connections-%s' % stype[2])
else:
self.settings.beginGroup('/Qgis/connections-%s' % stype[1])
self.settings.beginGroup('/qgis/connections-%s' % stype[1])
keys = self.settings.childGroups()
self.settings.endGroup()

@@ -745,9 +745,9 @@ def add_to_ows(self):

# no dups detected or overwrite is allowed
if caller in ['mActionAddAms', 'mActionAddAfs']:
self.settings.beginGroup('/Qgis/connections-%s' % stype[2])
self.settings.beginGroup('/qgis/connections-%s' % stype[2])
else:
self.settings.beginGroup('/Qgis/connections-%s' % stype[1])
self.settings.beginGroup('/qgis/connections-%s' % stype[1])
self.settings.setValue('/%s/url' % sname, clean_ows_url(data_url))
self.settings.endGroup()

@@ -760,15 +760,15 @@ def add_to_ows(self):
if service_type == 'OGC:WMS/OGC:WMTS':
ows_provider.addRasterLayer.connect(self.iface.addRasterLayer)
conn_cmb = ows_provider.findChild(QWidget, 'cmbConnections')
connect = 'on_btnConnect_clicked'
connect = 'btnConnect_clicked'
elif service_type == 'OGC:WFS':
ows_provider.addWfsLayer.connect(self.iface.mainWindow().addWfsLayer)
conn_cmb = ows_provider.findChild(QWidget, 'cmbConnections')
connect = 'connectToServer'
elif service_type == 'OGC:WCS':
ows_provider.addRasterLayer.connect(self.iface.addRasterLayer)
conn_cmb = ows_provider.findChild(QWidget, 'mConnectionsComboBox')
connect = 'on_mConnectButton_clicked'
connect = 'mConnectButton_clicked'
elif service_type == 'ESRI:ArcGIS:MapServer':
ows_provider.addAction(self.iface.actionAddAmsLayer())
conn_cmb = ows_provider.findChild(QComboBox)

0 comments on commit a0639b1

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