Fixed some 'focus' issues in shipbrowser

This commit is contained in:
HomeWorld
2011-05-15 21:03:05 +03:00
parent fef545775b
commit af8a9be93f
2 changed files with 7 additions and 3 deletions

View File

@@ -34,9 +34,9 @@ class PFListPane(wx.ScrolledWindow):
self.Bind(wx.EVT_SCROLLWIN_LINEUP, self.MScrollUp)
self.Bind(wx.EVT_SCROLLWIN_LINEDOWN, self.MScrollDown)
self.Bind(wx.EVT_CHILD_FOCUS, self.OnChildFocus)
# self.Bind(wx.EVT_CHILD_FOCUS, self.OnChildFocus)
self.Bind(wx.EVT_LEFT_DOWN, self.ForceFocus)
self.Bind(wx.EVT_MOUSE_CAPTURE_CHANGED, self.ForceFocus)
# self.Bind(wx.EVT_MOUSE_CAPTURE_CHANGED, self.ForceFocus)
def ForceFocus(self,event):
if self.FindFocus() and self.FindFocus().Parent != self:
@@ -121,7 +121,7 @@ class PFListPane(wx.ScrolledWindow):
def IsWidgetSelectedByContext(self, widget):
return False
def RefreshList(self, doRefresh = False, doFocus = True):
def RefreshList(self, doRefresh = False, doFocus = False):
ypos = 0
maxy = 0
scrollTo = 0

View File

@@ -1271,6 +1271,10 @@ class FitItem(SFItem.SFBrowserItem):
self.selTimer = wx.Timer(self,self.selTimerID)
self.selTimer.Start(100)
def GetType(self):
return 3
def OnTimer(self, event):
if self.selTimerID == event.GetId():