|
@@ -156,7 +156,8 @@ class DisplayAttributesDialog(wx.Dialog):
|
|
|
# bindigs
|
|
|
btnReset.Bind(wx.EVT_BUTTON, self.OnReset)
|
|
|
btnSubmit.Bind(wx.EVT_BUTTON, self.OnSubmit)
|
|
|
- btnCancel.Bind(wx.EVT_BUTTON, self.OnCancel)
|
|
|
+ btnCancel.Bind(wx.EVT_BUTTON, self.OnClose)
|
|
|
+ self.Bind(wx.EVT_CLOSE, self.OnClose)
|
|
|
|
|
|
self.SetSizer(mainSizer)
|
|
|
mainSizer.Fit(self)
|
|
@@ -297,8 +298,8 @@ class DisplayAttributesDialog(wx.Dialog):
|
|
|
if name != key and id != wx.NOT_FOUND:
|
|
|
self.FindWindowById(id).SetValue(str(value))
|
|
|
|
|
|
- def OnCancel(self, event):
|
|
|
- """!Cancel button pressed
|
|
|
+ def OnClose(self, event):
|
|
|
+ """!Closes dialog and removes query layer.
|
|
|
"""
|
|
|
frame = self.parent.parent
|
|
|
frame.dialogs['attributes'] = None
|
|
@@ -310,7 +311,7 @@ class DisplayAttributesDialog(wx.Dialog):
|
|
|
frame.RemoveQueryLayer()
|
|
|
self.parent.UpdateMap(render = True)
|
|
|
|
|
|
- self.Close()
|
|
|
+ self.Destroy()
|
|
|
|
|
|
def OnSubmit(self, event):
|
|
|
"""!Submit records"""
|
|
@@ -340,7 +341,7 @@ class DisplayAttributesDialog(wx.Dialog):
|
|
|
layer += 1
|
|
|
|
|
|
if close and self.closeDialog.IsChecked():
|
|
|
- self.OnCancel(event)
|
|
|
+ self.OnClose(event)
|
|
|
|
|
|
def OnFeature(self, event):
|
|
|
self.fid = int(event.GetString())
|