Make sure we don't get an index out of range in fittingview tooltip show stuff (OnMouseMove)

This commit is contained in:
HomeWorld
2012-03-18 13:39:42 +02:00
parent 37a24ad432
commit ddbd54fe5d

View File

@@ -144,13 +144,14 @@ class FittingView(d.Display):
def OnMouseMove(self, event):
row, _, col = self.HitTestSubItem(event.Position)
if row != -1 and col != -1:
if row != -1 and col != -1 and col < len(self.DEFAULT_COLS):
mod = self.mods[self.GetItemData(row)]
if self.DEFAULT_COLS[col] == "Miscellanea":
tooltip = self.activeColumns[col].getToolTip(mod)
self.SetToolTipString(tooltip)
else:
self.SetToolTipString("")
event.Skip()
def handleDrag(self, type, fitID):
if type == "fit":