]> git.lyx.org Git - features.git/commitdiff
Revert "avoid redundant toolbar initialization"
authorJuergen Spitzmueller <spitz@lyx.org>
Sat, 20 Apr 2013 09:40:40 +0000 (11:40 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Sat, 20 Apr 2013 09:40:40 +0000 (11:40 +0200)
This reverts commit 0f26aabeee3663f2cfaa89c983b668486610e564.

It turned out this breaks session.

src/frontends/qt4/GuiView.cpp
src/frontends/qt4/GuiView.h

index e46ec16471bbc0c2f0a9949dcb624fef6fde9886..d29cc3f5af2ad0c48cb2901c20293b1966cbe7db 100644 (file)
@@ -501,8 +501,10 @@ GuiView::GuiView(int id)
 
        if (lyxrc.allow_geometry_session) {
                // Now take care of session management.
-               if (restoreLayout(true))
+               if (restoreLayout()) {
+                       initToolbars();
                        return;
+               }
        }
 
        // no session handling, default to a sane size.
@@ -623,7 +625,7 @@ void GuiView::saveUISettings() const
 }
 
 
-bool GuiView::restoreLayout(bool force_inittoolbars)
+bool GuiView::restoreLayout()
 {
        QSettings settings;
        settings.beginGroup("views");
@@ -672,8 +674,7 @@ bool GuiView::restoreLayout(bool force_inittoolbars)
        if ((dialog = findOrBuild("findreplaceadv", true)))
                dialog->prepareView();
 
-       if (!restoreState(settings.value("layout").toByteArray(), 0)
-           || force_inittoolbars)
+       if (!restoreState(settings.value("layout").toByteArray(), 0))
                initToolbars();
        updateDialogs();
        return true;
index 596e66194917daa21cfc9b936b2fa619e64e7d8d..aa03b84a83bf6b717927c7d60a2deb44e4b0d5f2 100644 (file)
@@ -336,7 +336,7 @@ private:
        /// Saves the settings of toolbars and all dialogs
        void saveUISettings() const;
        ///
-       bool restoreLayout(bool force_inittoolbars = false);
+       bool restoreLayout();
        ///
        GuiToolbar * toolbar(std::string const & name);
        ///