Skip to content

Commit

Permalink
[MetaSearch] OWS GetCapabilities checking regression (fixes #19787) […
Browse files Browse the repository at this point in the history
…needs-docs]
  • Loading branch information
tomkralidis authored and nyalldawson committed Feb 5, 2019
1 parent 867e399 commit fe82890
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 72 deletions.
28 changes: 4 additions & 24 deletions python/plugins/MetaSearch/dialogs/maindialog.py
Expand Up @@ -141,11 +141,6 @@ def __init__(self, iface):
self.mActionAddGisFile.triggered.connect(self.add_gis_file) self.mActionAddGisFile.triggered.connect(self.add_gis_file)
self.btnShowXml.clicked.connect(self.show_xml) 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() self.manageGui()


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


self.reset_buttons() 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 # install proxy handler if specified in QGIS settings
self.install_proxy() self.install_proxy()


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


# check for duplicates # check for duplicates
if sname in keys: # duplicate found if sname in keys: # duplicate found
if self.radioTitleAsk.isChecked(): # ask to overwrite msg = self.tr('Connection {0} exists. Overwrite?').format(sname)
msg = self.tr('Connection {0} exists. Overwrite?').format(sname) res = QMessageBox.warning(self, self.tr('Saving server'), msg,
res = QMessageBox.warning(self, self.tr('Saving server'), msg, QMessageBox.Yes | QMessageBox.No)
QMessageBox.Yes | QMessageBox.No) if res != QMessageBox.Yes: # assign new name with serial
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
sname = serialize_string(sname) sname = serialize_string(sname)


# no dups detected or overwrite is allowed # no dups detected or overwrite is allowed
Expand Down
56 changes: 8 additions & 48 deletions python/plugins/MetaSearch/ui/maindialog.ui
Expand Up @@ -23,7 +23,7 @@
<item> <item>
<widget class="QTabWidget" name="tabWidget"> <widget class="QTabWidget" name="tabWidget">
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>2</number>
</property> </property>
<widget class="QWidget" name="tabSearch"> <widget class="QWidget" name="tabSearch">
<attribute name="title"> <attribute name="title">
Expand Down Expand Up @@ -485,46 +485,6 @@
<string>Settings</string> <string>Settings</string>
</attribute> </attribute>
<layout class="QVBoxLayout" name="verticalLayout_4"> <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> <item>
<widget class="QGroupBox" name="groupBox_4"> <widget class="QGroupBox" name="groupBox_4">
<property name="title"> <property name="title">
Expand Down Expand Up @@ -606,6 +566,13 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<customwidgets>
<customwidget>
<class>QgsFilterLineEdit</class>
<extends>QLineEdit</extends>
<header>qgis.gui</header>
</customwidget>
</customwidgets>
<resources/> <resources/>
<connections> <connections>
<connection> <connection>
Expand Down Expand Up @@ -641,11 +608,4 @@
</hints> </hints>
</connection> </connection>
</connections> </connections>
<customwidgets>
<customwidget>
<class>QgsFilterLineEdit</class>
<extends>QLineEdit</extends>
<header>qgis.gui</header>
</customwidget>
</customwidgets>
</ui> </ui>

0 comments on commit fe82890

Please sign in to comment.