From: daid Date: Thu, 13 Feb 2014 14:28:03 +0000 (+0100) Subject: Add stupidMacOSworkaround. X-Git-Tag: 14.02-RC2~18 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=db762ddf9d5a7e5882b27b10c1e21e50f22b090c;p=cura.git Add stupidMacOSworkaround. --- diff --git a/Cura/gui/app.py b/Cura/gui/app.py index 3dd6cafd..3140e33b 100644 --- a/Cura/gui/app.py +++ b/Cura/gui/app.py @@ -155,6 +155,19 @@ class CuraApp(wx.App): setFullScreenCapable(self.mainWindow) + if sys.platform.startswith('darwin'): + wx.CallAfter(self.StupidMacOSWorkaround) + + def StupidMacOSWorkaround(self): + """ + On MacOS for some magical reason opening new frames does not work until you opened a new modal dialog and closed it. + If we do this from software, then, as if by magic, the bug which prevents opening extra frames is gone. + """ + dlg = wx.Dialog(None) + wx.PostEvent(dlg, wx.CommandEvent(wx.EVT_CLOSE.typeId)) + dlg.ShowModal() + dlg.Destroy() + if platform.system() == "Darwin": #Mac magic. Dragons live here. THis sets full screen options. try: import ctypes, objc