THIS FIX DESERVES A BEER, fixed a clear case of WTF in contextmenu. All blame goes to CNC

This commit is contained in:
HomeWorld
2010-10-05 00:47:19 +03:00
parent 4fe34ef8a3
commit 5d2adb932f

View File

@@ -39,10 +39,10 @@ class ContextMenu(object):
if isinstance(texts, basestring):
texts = (texts,)
for i, text in enumerate(texts):
for it, text in enumerate(texts):
id = wx.NewId()
item = wx.MenuItem(menu, id, text)
cls.activeMenu[id] = (m, context, selection, i)
cls.activeMenu[id] = (m, context, selection, it)
menu.Bind(wx.EVT_MENU, cls.handler)
bitmap = m.getBitmap(context, selection)
@@ -74,4 +74,4 @@ class ContextMenu(object):
def getBitmap(self, context, selection):
return None
from gui.builtinContextMenus import *
from gui.builtinContextMenus import *