Added new supported items in itemRemove item class.

Added the ability to remove charges and projected items using the
itemRemove built in context menu.

In this commit I fixed a minor bug in the projected view that caused the
right clicked item not to be SHOWN as selected until after the context
menu had been spawned and closed.

I also removed all parent references from the ContextMenu class and sub
classes. I am instead using the fit service to do all the work of
removing the items in the itemRemove class.
This commit is contained in:
Master3See
2013-08-01 14:14:50 -06:00
parent 0a162b30e6
commit fb20847920
21 changed files with 88 additions and 68 deletions

View File

@@ -26,7 +26,7 @@ class ContextMenu(object):
ContextMenu.menus.append(cls)
@classmethod
def getMenu(cls, parent, selection, *fullContexts):
def getMenu(cls, selection, *fullContexts):
menu = wx.Menu()
menu.info = {}
menu.selection = selection
@@ -40,7 +40,7 @@ class ContextMenu(object):
except IndexError:
itmContext = None
for menuHandler in cls.menus:
m = menuHandler(parent)
m = menuHandler()
if m.display(srcContext, selection):
amount += 1
texts = m.getText(itmContext, selection)