Fixed a visual bug (the shipbrowser item not getting updated correctly in certain cases when wx.EVT_LEAVE_WINDOW occured)

This commit is contained in:
HomeWorld
2011-02-26 15:43:11 +02:00
parent 987209089c
commit 1829846455

View File

@@ -301,14 +301,9 @@ class SFBrowserItem(wx.Window):
event.Skip()
def OnLeaveWindow(self, event):
mposx, mposy = wx.GetMousePosition()
rect = self.GetRect()
rect.top = rect.left = 0
cx,cy = self.ScreenToClient((mposx,mposy))
if not rect.Contains((cx,cy)):
self.SetHighlighted(False)
self.toolbar.ClearState()
self.Refresh()
self.SetHighlighted(False)
self.toolbar.ClearState()
self.Refresh()
event.Skip()
def OnMotion(self, event):