Skip to content

Commit

Permalink
Add create action in the edit menu
Browse files Browse the repository at this point in the history
  • Loading branch information
mpitid committed Oct 19, 2011
1 parent d61bc9d commit efb1eb8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions labelme.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ def __init__(self, filename=None):
zoomActions=zoomActions,
fileMenuActions=(open,save,close,quit),
beginner=(), advanced=(),
editMenu=(edit, copy, delete, None, color1, color2),
beginnerContext=(create, edit, copy, delete),
advancedContext=(createMode, editMode, edit, copy,
delete, shapeLineColor, shapeFillColor),
Expand All @@ -243,9 +244,6 @@ def __init__(self, filename=None):
view=self.menu('&View'),
labelList=labelMenu)

addActions(self.menus.edit, (
edit, copy, delete, None, color1, color2))

addActions(self.menus.view, (
labels, advancedMode, None,
hideAll, showAll, None,
Expand Down Expand Up @@ -351,6 +349,10 @@ def populateModeActions(self):
addActions(self.tools, tool)
self.canvas.menus[0].clear()
addActions(self.canvas.menus[0], menu)
self.menus.edit.clear()
addActions(self.menus.edit,
(self.actions.create,) + self.actions.editMenu\
if self.beginner() else self.actions.editMenu)

def setBeginner(self):
self.tools.clear()
Expand Down

0 comments on commit efb1eb8

Please sign in to comment.