Rework target profile and damage pattern menus to use regular ticks

This commit is contained in:
DarkPhoenix
2019-07-31 15:54:09 +03:00
parent 1e3783c21d
commit 1f5fe47580
7 changed files with 42 additions and 33 deletions

View File

@@ -97,8 +97,8 @@ class ContextMenu(metaclass=ABCMeta):
multiple = not isinstance(bitmap, wx.Bitmap)
for it, text in enumerate(texts):
id = ContextMenu.nextID()
check = m.checked
rootItem = wx.MenuItem(rootMenu, id, text, kind=wx.ITEM_NORMAL if m.checked is None else wx.ITEM_CHECK)
check = m.isChecked(it)
rootItem = wx.MenuItem(rootMenu, id, text, kind=wx.ITEM_NORMAL if check is None else wx.ITEM_CHECK)
rootMenu.info[id] = (m, callingWindow, fullContext, it)
sub = m._baseGetSubMenu(callingWindow, srcContext, mainItem, selection, rootMenu, it, rootItem)
@@ -180,8 +180,7 @@ class ContextMenu(metaclass=ABCMeta):
return ContextMenu._ids[ContextMenu._idxid]
@property
def checked(self):
def isChecked(self, i):
'''If menu item is toggleable, this should return bool value'''
return None