if (lyxrc.allow_geometry_session) {
// Now take care of session management.
- if (restoreLayout()) {
- initToolbars();
+ if (restoreLayout(true))
return;
- }
}
// no session handling, default to a sane size.
}
-bool GuiView::restoreLayout()
+bool GuiView::restoreLayout(bool force_inittoolbars)
{
QSettings settings;
settings.beginGroup("views");
if ((dialog = findOrBuild("findreplaceadv", true)))
dialog->prepareView();
- if (!restoreState(settings.value("layout").toByteArray(), 0))
+ if (!restoreState(settings.value("layout").toByteArray(), 0)
+ || force_inittoolbars)
initToolbars();
updateDialogs();
return true;
/// Saves the settings of toolbars and all dialogs
void saveUISettings() const;
///
- bool restoreLayout();
+ bool restoreLayout(bool force_inittoolbars = false);
///
GuiToolbar * toolbar(std::string const & name);
///