THIS FIX DESERVES A BEER, fixed a clear case of WTF in contextmenu. All blame goes to CNC
This commit is contained in:
@@ -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 *
|
||||
|
||||
Reference in New Issue
Block a user