Change the way we handle dialogs

This commit is contained in:
DarkPhoenix
2019-08-09 20:09:31 +03:00
parent 3174deed99
commit 01371f227c
19 changed files with 107 additions and 140 deletions

View File

@@ -74,7 +74,6 @@ class PreferenceDialog(wx.Dialog):
self.Layout()
self.Bind(wx.EVT_CLOSE, self.OnClose)
self.Bind(wx.EVT_CHAR_HOOK, self.kbEvent)
self.btnOK.Bind(wx.EVT_BUTTON, self.OnBtnOK)
@@ -88,8 +87,3 @@ class PreferenceDialog(wx.Dialog):
self.Close()
return
event.Skip()
def OnClose(self, event):
if self.IsModal():
self.EndModal(wx.ID_OK)
self.Destroy()