* first clear the menubar, then fill it (with mac menu items)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22285 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Stefan Schimanski 2007-12-23 18:51:11 +00:00
parent 5636ca5dea
commit a6f3a3c59c

View File

@ -42,6 +42,10 @@ GuiMenubar::GuiMenubar(GuiView * view, MenuBackend & mbe)
void GuiMenubar::init() void GuiMenubar::init()
{ {
// Clear all menubar contents before filling it.
owner_->menuBar()->clear();
// setup special mac specific menu item
macxMenuBarInit(); macxMenuBarInit();
LYXERR(Debug::GUI, "populating menu bar" << to_utf8(menubackend_.getMenubar().name())); LYXERR(Debug::GUI, "populating menu bar" << to_utf8(menubackend_.getMenubar().name()));
@ -57,9 +61,6 @@ void GuiMenubar::init()
<< menubackend_.getMenubar().size()); << menubackend_.getMenubar().size());
} }
// Clear all menubar contents before filling it.
owner_->menuBar()->clear();
Menu menu; Menu menu;
menubackend_.expand(menubackend_.getMenubar(), menu, owner_->buffer()); menubackend_.expand(menubackend_.getMenubar(), menu, owner_->buffer());