]> git.lyx.org Git - lyx.git/blobdiff - src/MenuBackend.cpp
updated list of LyX translations
[lyx.git] / src / MenuBackend.cpp
index 50c2d037cc9d4c7d2782c2762214d22f318faaa0..7865786ff3ff326297b4c0c1e704c8a5aeead262 100644 (file)
@@ -705,6 +705,10 @@ void expandToc(Menu & tomenu, Buffer const * buf)
                return;
        }
 
+       Buffer* cbuf = const_cast<Buffer*>(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")));
        }
 }