chiark / gitweb /
Add Shift-F6 hotkey to open the WX inspection tool
authorYouness Alaoui <kakaroto@kakaroto.homelinux.net>
Mon, 10 Aug 2015 21:31:22 +0000 (17:31 -0400)
committerYouness Alaoui <kakaroto@kakaroto.homelinux.net>
Mon, 10 Aug 2015 21:31:22 +0000 (17:31 -0400)
Cura/gui/app.py
Cura/gui/sceneView.py

index a8759c0f34405be0f07d205a60e0c806f7203c25..dc051bf60dada4357b46bb482755f962c341a136 100644 (file)
@@ -173,7 +173,7 @@ class CuraApp(wx.App):
                if version.isDevVersion():
                        import wx.lib.inspection
                        # Show the WX widget inspection tool
-                       wx.lib.inspection.InspectionTool().Show()
+                       #wx.lib.inspection.InspectionTool().Show()
 
                if sys.platform.startswith('darwin'):
                        wx.CallAfter(self.StupidMacOSWorkaround)
index 7c7136e68f4952e70edeb2d71aaee4628f9b4176..d1356c03190c72bb9849c8946d76c9cee825d2cb 100644 (file)
@@ -1,6 +1,7 @@
 __copyright__ = "Copyright (C) 2013 David Braam - Released under terms of the AGPLv3 License"
 
 import wx
+import wx.lib.inspection
 import numpy
 import time
 import os
@@ -837,6 +838,9 @@ class SceneView(openglGui.glGuiPanel):
                        self._beforeLeakTest = defaultdict(int)
                        for i in get_objects():
                                self._beforeLeakTest[type(i)] += 1
+               if keyCode == wx.WXK_F6 and wx.GetKeyState(wx.WXK_SHIFT):
+                       # Show the WX widget inspection tool
+                       wx.lib.inspection.InspectionTool().Show()
                if keyCode == wx.WXK_F5 and wx.GetKeyState(wx.WXK_SHIFT):
                        from collections import defaultdict
                        from gc import get_objects