Get command fit menu up and running. Had to revert to a non-cached version of the menu, as the instance has root menu, which we need in order to properly bind. Don't think caching the menu would have really given a large performance gain anyway.

This commit is contained in:
blitzman
2017-03-23 00:29:31 -04:00
parent 4065022866
commit 732386b83a
2 changed files with 60 additions and 11 deletions

View File

@@ -197,13 +197,13 @@ class CommandView(d.Display):
fitSrcContext = "commandFit"
fitItemContext = item.name
context = ((fitSrcContext, fitItemContext),)
context += ("command",),
context += ("commandView",),
menu = ContextMenu.getMenu((item,), *context)
elif sel == -1:
fitID = self.mainFrame.getActiveFit()
if fitID is None:
return
context = (("command",),)
context = (("commandView",),)
menu = ContextMenu.getMenu([], *context)
if menu is not None:
self.PopupMenu(menu)