Commit f4d8fc2a authored by Charl Botha's avatar Charl Botha
Browse files

Removed SetFocus() calls in OnEnter event handlers. This violates the focus

policy of the current UI / window manager.
parent aedb4c73
......@@ -96,8 +96,6 @@ class wxVTKRenderWindowInteractor(baseClass):
def __init__(self, parent, ID, *args, **kw):
# private attributes
self.__OldFocus = None
self.__RenderWhenDisabled = 0
# First do special handling of some keywords:
......@@ -197,9 +195,6 @@ class wxVTKRenderWindowInteractor(baseClass):
EVT_SIZE(self, self.OnSize)
EVT_SET_FOCUS(self, self.OnSetFocus)
EVT_KILL_FOCUS(self, self.OnKillFocus)
def __getattr__(self, attr):
"""Makes the object behave like a
vtkGenericRenderWindowInteractor"""
......@@ -242,9 +237,6 @@ class wxVTKRenderWindowInteractor(baseClass):
self._Iren.MouseMoveEvent()
def OnEnter(self,event):
if self.__OldFocus == None:
self.__OldFocus = wxWindow_FindFocus()
self.SetFocus()
self._Iren.SetEventInformationFlipY(event.GetX(), event.GetY(),
event.ControlDown(),
event.ShiftDown(),
......@@ -252,9 +244,6 @@ class wxVTKRenderWindowInteractor(baseClass):
self._Iren.EnterEvent()
def OnLeave(self,event):
if self.__OldFocus:
self.__OldFocus.SetFocus()
self.__OldFocus = None
self._Iren.SetEventInformationFlipY(event.GetX(), event.GetY(),
event.ControlDown(),
event.ShiftDown(),
......@@ -322,12 +311,6 @@ class wxVTKRenderWindowInteractor(baseClass):
keysym)
self._Iren.KeyReleaseEvent()
def OnSetFocus(self,event):
pass
def OnKillFocus(self,event):
pass
def GetRenderWindow(self):
return self._RenderWindow
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment