The handlers for EVT_CLOSE and EVT_MENU(wx.ID_EXIT) should not be the same
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@45948 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -395,7 +395,7 @@ class PyAUIFrame(wx.Frame):
|
|||||||
self.Bind(wx.EVT_MENU, self.OnChangeContentPane, id=ID_TextContent)
|
self.Bind(wx.EVT_MENU, self.OnChangeContentPane, id=ID_TextContent)
|
||||||
self.Bind(wx.EVT_MENU, self.OnChangeContentPane, id=ID_SizeReportContent)
|
self.Bind(wx.EVT_MENU, self.OnChangeContentPane, id=ID_SizeReportContent)
|
||||||
self.Bind(wx.EVT_MENU, self.OnChangeContentPane, id=ID_HTMLContent)
|
self.Bind(wx.EVT_MENU, self.OnChangeContentPane, id=ID_HTMLContent)
|
||||||
self.Bind(wx.EVT_MENU, self.OnClose, id=wx.ID_EXIT)
|
self.Bind(wx.EVT_MENU, self.OnExit, id=wx.ID_EXIT)
|
||||||
self.Bind(wx.EVT_MENU, self.OnAbout, id=ID_About)
|
self.Bind(wx.EVT_MENU, self.OnAbout, id=ID_About)
|
||||||
|
|
||||||
self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateUI, id=ID_TransparentHint)
|
self.Bind(wx.EVT_UPDATE_UI, self.OnUpdateUI, id=ID_TransparentHint)
|
||||||
@@ -431,13 +431,13 @@ class PyAUIFrame(wx.Frame):
|
|||||||
|
|
||||||
|
|
||||||
def OnClose(self, event):
|
def OnClose(self, event):
|
||||||
|
|
||||||
self._mgr.UnInit()
|
self._mgr.UnInit()
|
||||||
del self._mgr
|
del self._mgr
|
||||||
self.Destroy()
|
self.Destroy()
|
||||||
|
|
||||||
event.Skip()
|
|
||||||
|
|
||||||
|
def OnExit(self, event):
|
||||||
|
self.Close()
|
||||||
|
|
||||||
def OnAbout(self, event):
|
def OnAbout(self, event):
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user