diff --git a/labelme.py b/labelme.py index 7dbfd3d8f..fbece3cbb 100755 --- a/labelme.py +++ b/labelme.py @@ -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), @@ -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, @@ -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()