From ac3851686300b4e0ca58380689c9cd5777d947d2 Mon Sep 17 00:00:00 2001 From: Youness Alaoui Date: Mon, 10 Aug 2015 17:21:26 -0400 Subject: [PATCH] Fix the wx inspection window showing up --- Cura/gui/app.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Cura/gui/app.py b/Cura/gui/app.py index 2691965b..a8759c0f 100644 --- a/Cura/gui/app.py +++ b/Cura/gui/app.py @@ -157,14 +157,11 @@ class CuraApp(wx.App): profile.performVersionUpgrade() #newVersionDialog.newVersionDialog().Show() + # Must happen before the main window is created, in case there are changes + # that would affect it (such as machine name changes) if version.isDevVersion(): profile.performVersionUpgrade() - import wx.lib.inspection - # Show the WX widget inspection tool - #wx.lib.inspection.InspectionTool().Show() - - self.mainWindow = mainWindow.mainWindow() self.destroySplashScreen() self.SetTopWindow(self.mainWindow) @@ -172,6 +169,12 @@ class CuraApp(wx.App): self.mainWindow.OnDropFiles(self.loadFiles) setFullScreenCapable(self.mainWindow) + # Must come after creating the main window + if version.isDevVersion(): + import wx.lib.inspection + # Show the WX widget inspection tool + wx.lib.inspection.InspectionTool().Show() + if sys.platform.startswith('darwin'): wx.CallAfter(self.StupidMacOSWorkaround) -- 2.30.2