chiark
/
gitweb
/
~ianmdlvl
/
cura.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9f1c20c
)
Do not render the focus objects if we do not have the mouse on the 3D window, increas...
author
daid
<daid303@gmail.com>
Mon, 17 Jun 2013 06:56:37 +0000
(08:56 +0200)
committer
daid
<daid303@gmail.com>
Mon, 17 Jun 2013 06:56:37 +0000
(08:56 +0200)
Cura/gui/sceneView.py
patch
|
blob
|
history
diff --git
a/Cura/gui/sceneView.py
b/Cura/gui/sceneView.py
index 184eb91786f4edb22aec2a6bc6df2aa4c534cecf..ba7d651e2acb60b215345464942fc448fcf771d5 100644
(file)
--- a/
Cura/gui/sceneView.py
+++ b/
Cura/gui/sceneView.py
@@
-106,6
+106,7
@@
class SceneView(openglGui.glGuiPanel):
self._sceneUpdateTimer = wx.Timer(self)
self.Bind(wx.EVT_TIMER, self._onRunSlicer, self._sceneUpdateTimer)
self.Bind(wx.EVT_MOUSEWHEEL, self.OnMouseWheel)
self._sceneUpdateTimer = wx.Timer(self)
self.Bind(wx.EVT_TIMER, self._onRunSlicer, self._sceneUpdateTimer)
self.Bind(wx.EVT_MOUSEWHEEL, self.OnMouseWheel)
+ self.Bind(wx.EVT_LEAVE_WINDOW, self.OnMouseLeave)
self.OnViewChange()
self.OnToolSelect(0)
self.OnViewChange()
self.OnToolSelect(0)
@@
-683,6
+684,10
@@
class SceneView(openglGui.glGuiPanel):
self._zoom = numpy.max(self._machineSize) * 3
self.Refresh()
self._zoom = numpy.max(self._machineSize) * 3
self.Refresh()
+ def OnMouseLeave(self, e):
+ self._mouseX = -1
+ self._focusObj = None
+
def getMouseRay(self, x, y):
if self._viewport is None:
return numpy.array([0,0,0],numpy.float32), numpy.array([0,0,1],numpy.float32)
def getMouseRay(self, x, y):
if self._viewport is None:
return numpy.array([0,0,0],numpy.float32), numpy.array([0,0,1],numpy.float32)