From: Youness Alaoui Date: Wed, 7 Jan 2015 19:24:56 +0000 (-0500) Subject: Fix event skipping. Horrible e.Skip() naming... X-Git-Tag: 14.09-1.19~1^2~1 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=c930ba5d088498d0bf7d16dd6b73445844301e14;p=cura.git Fix event skipping. Horrible e.Skip() naming... e.Skip() MUST be called otherwise other handlers for the event won't be called --- diff --git a/Cura/gui/app.py b/Cura/gui/app.py index 43f6bae5..5b86fb00 100644 --- a/Cura/gui/app.py +++ b/Cura/gui/app.py @@ -26,7 +26,8 @@ class CuraApp(wx.App): self.splash = None self.loadFiles = files - self.Bind(wx.EVT_ACTIVATE_APP, self.OnActivate) + if platform.system() == "Darwin": + self.Bind(wx.EVT_ACTIVATE_APP, self.OnActivate) if sys.platform.startswith('win'): #Check for an already running instance, if another instance is running load files in there @@ -79,10 +80,9 @@ class CuraApp(wx.App): pass def OnActivate(self, e): - if platform.system() == "Darwin": - if e.GetActive(): - self.GetTopWindow().Raise() - e.Skip() + if e.GetActive(): + self.GetTopWindow().Raise() + e.Skip() def Win32SocketListener(self, port): import socket diff --git a/Cura/gui/splashScreen.py b/Cura/gui/splashScreen.py index 27463f5f..44bad77a 100644 --- a/Cura/gui/splashScreen.py +++ b/Cura/gui/splashScreen.py @@ -19,7 +19,8 @@ class splashScreen(wx.SplashScreen): def OnClose(self, e): if self.callback: - # Avoid calling the callback twice - self.callback() - self.callback = None + # Avoid calling the callback twice + self.callback() + self.callback = None wx.CallAfter(self.DoDestroy) + e.Skip()