Fixed a weird behaviour (tab changing on wxgtk) in itemstats notebook container

This commit is contained in:
HomeWorld
2010-10-09 11:47:06 +03:00
parent 6b8abcd63f
commit c3e15885fd

View File

@@ -123,12 +123,18 @@ class ItemStatsContainer ( wx.Panel ):
self.affectedby = ItemAffectedBy(self.nbContainer, stuff, item)
self.nbContainer.AddPage(self.affectedby, "Affected by")
self.nbContainer.Bind(wx.EVT_LEFT_DOWN, self.mouseHit)
self.SetSizer(mainSizer)
self.Layout()
def __del__( self ):
pass
def mouseHit(self, event):
tab, _ = self.nbContainer.HitTest(event.Position)
if tab != -1:
self.nbContainer.SetSelection(tab)
###########################################################################
## Class AutoListCtrl
###########################################################################