Skip to content
Permalink
Browse files

Allow to cancel server connections list modification

  • Loading branch information
DelazJ authored and nyalldawson committed Mar 4, 2020
1 parent eca5261 commit ca89d34059b64c7da0edf8a3c06911b0f8899e28
Showing with 4 additions and 2 deletions.
  1. +4 −2 python/plugins/MetaSearch/dialogs/maindialog.py
@@ -735,9 +735,11 @@ def add_to_ows(self):
if sname in keys: # duplicate found
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
QMessageBox.Yes | QMessageBox.No | QMessageBox.Cancel)
if res == QMessageBox.No: # assign new name with serial
sname = serialize_string(sname)
elif res == QMessageBox.Cancel:
return

# no dups detected or overwrite is allowed
if caller in ['mActionAddAms', 'mActionAddAfs']:

0 comments on commit ca89d34

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