X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FMenuBackend.cpp;h=7865786ff3ff326297b4c0c1e704c8a5aeead262;hb=38a3692a0fce8b0531cef794a08d179e9e33ac33;hp=50c2d037cc9d4c7d2782c2762214d22f318faaa0;hpb=24fb9c52146b6a0b246620d934b28e705e04a6a9;p=lyx.git diff --git a/src/MenuBackend.cpp b/src/MenuBackend.cpp index 50c2d037cc..7865786ff3 100644 --- a/src/MenuBackend.cpp +++ b/src/MenuBackend.cpp @@ -705,6 +705,10 @@ void expandToc(Menu & tomenu, Buffer const * buf) return; } + Buffer* cbuf = const_cast(buf); + cbuf->tocBackend().update(); + cbuf->structureChanged(); + // Add an entry for the master doc if this is a child doc Buffer const * const master = buf->getMasterBuffer(); if (buf != master) { @@ -789,9 +793,10 @@ void expandToolbars(Menu & tomenu) for (; cit != end; ++cit) { docstring label = _(cit->gui_name); - // frontends are not supposed to turn on/off toolbars, if they cannot - // update ToolbarBackend::flags. That is to say, ToolbarsBackend::flags - // should reflect the true state of toolbars. + // frontends are not supposed to turn on/off toolbars, + // if they cannot update ToolbarBackend::flags. That + // is to say, ToolbarsBackend::flags should reflect + // the true state of toolbars. // // menu is displayed as // on/off review @@ -801,7 +806,7 @@ void expandToolbars(Menu & tomenu) if (cit->flags & ToolbarInfo::AUTO) label += _(" (auto)"); tomenu.add(MenuItem(MenuItem::Command, label, - FuncRequest(LFUN_TOOLBAR_TOGGLE_STATE, cit->name))); + FuncRequest(LFUN_TOOLBAR_TOGGLE, cit->name + " allowauto"))); } }