chiark / gitweb /
Fix the wx inspection window showing up
authorYouness Alaoui <kakaroto@kakaroto.homelinux.net>
Mon, 10 Aug 2015 21:21:26 +0000 (17:21 -0400)
committerYouness Alaoui <kakaroto@kakaroto.homelinux.net>
Mon, 10 Aug 2015 21:21:26 +0000 (17:21 -0400)
Cura/gui/app.py

index 2691965bb8c311c4dfa83020643bc06a3f9f54d9..a8759c0f34405be0f07d205a60e0c806f7203c25 100644 (file)
@@ -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)