[GRASS-SVN] r58708 - grass/branches/releasebranch_6_4/gui/wxpython/dbmgr
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jan 13 13:45:23 PST 2014
Author: annakrat
Date: 2014-01-13 13:45:23 -0800 (Mon, 13 Jan 2014)
New Revision: 58708
Modified:
grass/branches/releasebranch_6_4/gui/wxpython/dbmgr/dialogs.py
Log:
wxGUI: fix for not closing of attribute dialog (#2162)
Modified: grass/branches/releasebranch_6_4/gui/wxpython/dbmgr/dialogs.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/dbmgr/dialogs.py 2014-01-13 18:40:43 UTC (rev 58707)
+++ grass/branches/releasebranch_6_4/gui/wxpython/dbmgr/dialogs.py 2014-01-13 21:45:23 UTC (rev 58708)
@@ -153,7 +153,8 @@
# 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)
@@ -298,8 +299,8 @@
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
@@ -311,7 +312,7 @@
frame.RemoveQueryLayer()
self.parent.UpdateMap(render = True)
- self.Close()
+ self.Destroy()
def OnSubmit(self, event):
"""!Submit records"""
@@ -333,7 +334,7 @@
stdin = sql)
if close and self.closeDialog.IsChecked():
- self.OnCancel(event)
+ self.OnClose(event)
def OnFeature(self, event):
self.fid = int(event.GetString())
More information about the grass-commit
mailing list