Skip to content
Permalink
Browse files

[MetaSearch] OWS GetCapabilities checking regression (fixes #19787) […

…needs-docs]
  • Loading branch information
tomkralidis authored and nyalldawson committed Feb 5, 2019
1 parent 867e399 commit fe8289005598cb006293e9fe38dcda10638e0690
Showing with 12 additions and 72 deletions.
  1. +4 −24 python/plugins/MetaSearch/dialogs/maindialog.py
  2. +8 −48 python/plugins/MetaSearch/ui/maindialog.ui
@@ -141,11 +141,6 @@ def __init__(self, iface):
self.mActionAddGisFile.triggered.connect(self.add_gis_file)
self.btnShowXml.clicked.connect(self.show_xml)

# settings
self.radioTitleAsk.clicked.connect(self.set_ows_save_title_ask)
self.radioTitleNoAsk.clicked.connect(self.set_ows_save_title_no_ask)
self.radioTempName.clicked.connect(self.set_ows_save_temp_name)

self.manageGui()

def manageGui(self):
@@ -166,16 +161,6 @@ def manageGui(self):

self.reset_buttons()

# get preferred connection save strategy from settings and set it
save_strategy = self.settings.value('/MetaSearch/ows_save_strategy',
'title_ask')
if save_strategy == 'temp_name':
self.radioTempName.setChecked(True)
elif save_strategy == 'title_no_ask':
self.radioTitleNoAsk.setChecked(True)
else:
self.radioTitleAsk.setChecked(True)

# install proxy handler if specified in QGIS settings
self.install_proxy()

@@ -748,15 +733,10 @@ def add_to_ows(self):

# check for duplicates
if sname in keys: # duplicate found
if self.radioTitleAsk.isChecked(): # ask to overwrite
msg = self.tr('Connection {0} exists. Overwrite?').format(sname)
res = QMessageBox.warning(self, self.tr('Saving server'), msg,
QMessageBox.Yes | QMessageBox.No)
if res != QMessageBox.Yes: # assign new name with serial
sname = serialize_string(sname)
elif self.radioTitleNoAsk.isChecked(): # don't ask to overwrite
pass
elif self.radioTempName.isChecked(): # use temp name
msg = self.tr('Connection {0} exists. Overwrite?').format(sname)
res = QMessageBox.warning(self, self.tr('Saving server'), msg,
QMessageBox.Yes | QMessageBox.No)
if res != QMessageBox.Yes: # assign new name with serial
sname = serialize_string(sname)

# no dups detected or overwrite is allowed
@@ -23,7 +23,7 @@
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
<number>2</number>
</property>
<widget class="QWidget" name="tabSearch">
<attribute name="title">
@@ -485,46 +485,6 @@
<string>Settings</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QGroupBox" name="saveStrategyGroup">
<property name="title">
<string>Connection Naming</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QLabel" name="lblSaveStrategy">
<property name="text">
<string>When saving the connection of an OWS service</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioTitleAsk">
<property name="text">
<string>Use the OWS Service Title and ask before overwriting</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioTitleNoAsk">
<property name="text">
<string>Use the OWS Service Title and always overwrite if already available</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioTempName">
<property name="text">
<string>Use a temporary name, which you can change later</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_4">
<property name="title">
@@ -606,6 +566,13 @@
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>QgsFilterLineEdit</class>
<extends>QLineEdit</extends>
<header>qgis.gui</header>
</customwidget>
</customwidgets>
<resources/>
<connections>
<connection>
@@ -641,11 +608,4 @@
</hints>
</connection>
</connections>
<customwidgets>
<customwidget>
<class>QgsFilterLineEdit</class>
<extends>QLineEdit</extends>
<header>qgis.gui</header>
</customwidget>
</customwidgets>
</ui>

0 comments on commit fe82890

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