Skip to content

Commit

Permalink
wx.metadata/g.gui.cswbrowser: fix save/cancel new csw connection (#252)
Browse files Browse the repository at this point in the history
  • Loading branch information
tmszi committed Jul 14, 2020
1 parent 7fac523 commit 38949ae
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions grass7/gui/wxpython/wx.metadata/mdlib/cswlib.py
Expand Up @@ -1050,35 +1050,26 @@ def onNewconnection(self, evt=None, cancel=False):
if cancel:
self.newBtt.SetLabel('New')
self.newBtt.Enable()
self.stBoxConnections1Sizer.Remove(self.connNameNewLabel)
self.stBoxConnections1Sizer.Remove(self.connNameNew)
self.stBoxConnections1Sizer.Remove(self.connUrlNewLabel)
self.stBoxConnections1Sizer.Remove(self.connUrlNew)
self.connNameNew.Destroy()
self.connNameNewLabel.Destroy()
self.connUrlNewLabel.Destroy()
self.connUrlNew.Destroy()
self.stBoxConnections1Sizer.Show(1)
self.stBoxConnections1Sizer.Remove(self.cancelBtt)
self.cancelBtt.Destroy()
self.Fit()
return
if self.checkURLCSWvalidity(url):
name = self.connNameNew.GetValue()
if not self.addConection(name, url):
return
self.updateConnectionList()
self.newBtt.SetLabel('New')
self.newBtt.Enable()
self.stBoxConnections1Sizer.Remove(self.connNameNewLabel)
self.stBoxConnections1Sizer.Remove(self.connNameNew)
self.stBoxConnections1Sizer.Remove(self.connUrlNewLabel)
self.stBoxConnections1Sizer.Remove(self.connUrlNew)
self.connNameNew.Destroy()
self.connNameNewLabel.Destroy()
self.connUrlNewLabel.Destroy()
self.connUrlNew.Destroy()
self.stBoxConnections1Sizer.Show(1)
self.stBoxConnections1Sizer.Remove(self.cancelBtt)
self.cancelBtt.Destroy()
else:
GMessage('Url is not valid')
Expand Down

0 comments on commit 38949ae

Please sign in to comment.