X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FGuiMenubar.cpp;h=a06be19ae9be4f7c6049be88fcaebe271e138b38;hb=a37a73e3c949003766a7481ca72c7971c059fe3d;hp=194095ddffe0662b277a2014bb54900fbf0bdf0f;hpb=77a89e1486c833750dec94ad1308f55942ec0c8d;p=lyx.git diff --git a/src/frontends/qt4/GuiMenubar.cpp b/src/frontends/qt4/GuiMenubar.cpp index 194095ddff..a06be19ae9 100644 --- a/src/frontends/qt4/GuiMenubar.cpp +++ b/src/frontends/qt4/GuiMenubar.cpp @@ -39,6 +39,12 @@ namespace frontend { GuiMenubar::GuiMenubar(LyXView * view, MenuBackend & mbe) : owner_(static_cast(view)), menubackend_(mbe) +{ + init(); +} + + +void GuiMenubar::init() { macxMenuBarInit(); @@ -55,6 +61,9 @@ GuiMenubar::GuiMenubar(LyXView * view, MenuBackend & mbe) << menubackend_.getMenubar().size()); } + // Clear all menubar contents before filling it. + owner_->menuBar()->clear(); + Menu menu; menubackend_.expand(menubackend_.getMenubar(), menu, owner_->buffer());