]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/Toolbars.C
Document pasteParagraphList as hinted by Jean-Marc
[lyx.git] / src / frontends / Toolbars.C
index f03e50a070c347d246d5f7c33c88647b58a17b79..71cd21489196e01e3884b5b80980c346fa4c1c5c 100644 (file)
@@ -45,7 +45,10 @@ void Toolbars::initFlags(ToolbarBackend::Toolbar & tbb)
        ToolbarSection::ToolbarInfo & info = LyX::ref().session().toolbars().load(tbb.name);
 
        unsigned int flags = static_cast<unsigned int>(tbb.flags);
-       // remove position
+
+       // Remove default.ui positions. Only when a valid postion is stored 
+       // in the session file the default.ui value will be overwritten
+       unsigned int save = flags;
        TurnOffFlag(TOP);
        TurnOffFlag(BOTTOM);
        TurnOffFlag(RIGHT);
@@ -62,7 +65,8 @@ void Toolbars::initFlags(ToolbarBackend::Toolbar & tbb)
        else if (info.location == ToolbarSection::ToolbarInfo::LEFT)
                TurnOnFlag(LEFT);
        else {
-               TurnOnFlag(TOP);
+               // use setting from default.ui
+               flags = save;
                valid_location = false;
        }
 
@@ -329,7 +333,7 @@ void layoutSelected(LyXView & lv, string const & name)
                // Yes, the lyx::to_utf8(_()) is correct
                if (lyx::to_utf8(_(itname)) == name) {
                        FuncRequest const func(LFUN_LAYOUT, itname,
-                                              FuncRequest::UI);
+                                              FuncRequest::TOOLBAR);
                        lv.dispatch(func);
                        return;
                }