mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-27 11:52:25 +00:00
Fix toc and source-view initial showing.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25384 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
07af8fecb5
commit
162b3b3b30
@ -377,8 +377,8 @@ bool GuiView::restoreLayout()
|
|||||||
setGeometry(50, 50, 690, 510);
|
setGeometry(50, 50, 690, 510);
|
||||||
#endif
|
#endif
|
||||||
// Allow the toc and view-source dock widget to be restored if needed.
|
// Allow the toc and view-source dock widget to be restored if needed.
|
||||||
find_or_build("toc");
|
findOrBuild("toc", true);
|
||||||
find_or_build("view-source");
|
findOrBuild("view-source", true);
|
||||||
if (!restoreState(settings.value(key + "/layout").toByteArray(), 0))
|
if (!restoreState(settings.value(key + "/layout").toByteArray(), 0))
|
||||||
initToolbars();
|
initToolbars();
|
||||||
updateDialogs();
|
updateDialogs();
|
||||||
@ -2162,7 +2162,7 @@ void GuiView::resetDialogs()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Dialog * GuiView::find_or_build(string const & name)
|
Dialog * GuiView::findOrBuild(string const & name, bool hide_it)
|
||||||
{
|
{
|
||||||
if (!isValidName(name))
|
if (!isValidName(name))
|
||||||
return 0;
|
return 0;
|
||||||
@ -2176,6 +2176,8 @@ Dialog * GuiView::find_or_build(string const & name)
|
|||||||
d.dialogs_[name].reset(dialog);
|
d.dialogs_[name].reset(dialog);
|
||||||
if (lyxrc.allow_geometry_session)
|
if (lyxrc.allow_geometry_session)
|
||||||
dialog->restoreSession();
|
dialog->restoreSession();
|
||||||
|
if (hide_it)
|
||||||
|
dialog->hideView();
|
||||||
return dialog;
|
return dialog;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2187,7 +2189,7 @@ void GuiView::showDialog(string const & name, string const & data,
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
d.in_show_ = true;
|
d.in_show_ = true;
|
||||||
Dialog * dialog = find_or_build(name);
|
Dialog * dialog = findOrBuild(name, false);
|
||||||
if (dialog) {
|
if (dialog) {
|
||||||
dialog->showData(data);
|
dialog->showData(data);
|
||||||
if (inset)
|
if (inset)
|
||||||
|
@ -292,7 +292,7 @@ private:
|
|||||||
/// Is the dialog currently visible?
|
/// Is the dialog currently visible?
|
||||||
bool isDialogVisible(std::string const & name) const;
|
bool isDialogVisible(std::string const & name) const;
|
||||||
///
|
///
|
||||||
Dialog * find_or_build(std::string const & name);
|
Dialog * findOrBuild(std::string const & name, bool hide_it);
|
||||||
///
|
///
|
||||||
Dialog * build(std::string const & name);
|
Dialog * build(std::string const & name);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user