mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-10 18:58:10 +00:00
Fix bug #4906: Files always reopened in tabbed window on launch.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30690 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
ca931d4d52
commit
768b216c83
@ -1214,9 +1214,18 @@ void GuiApplication::restoreGuiSession()
|
|||||||
// Note that we open them in reverse order. This is because we close
|
// Note that we open them in reverse order. This is because we close
|
||||||
// buffers also in reverse order (aesthetically motivated).
|
// buffers also in reverse order (aesthetically motivated).
|
||||||
for (size_t i = lastopened.size(); i > 0; --i) {
|
for (size_t i = lastopened.size(); i > 0; --i) {
|
||||||
current_view_->loadDocument(lastopened[i - 1].file_name, false);
|
FileName const & file_name = lastopened[i - 1].file_name;
|
||||||
|
if (d->views_.empty() || (!lyxrc.open_buffers_in_tabs
|
||||||
|
&& current_view_->buffer() != 0)) {
|
||||||
|
boost::crc_32_type crc;
|
||||||
|
string const & fname = file_name.absFilename();
|
||||||
|
crc = for_each(fname.begin(), fname.end(), crc);
|
||||||
|
createView(crc.checksum());
|
||||||
|
}
|
||||||
|
current_view_->loadDocument(file_name, false);
|
||||||
|
|
||||||
if (lastopened[i - 1].active)
|
if (lastopened[i - 1].active)
|
||||||
active_file = lastopened[i - 1].file_name;
|
active_file = file_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Restore last active buffer
|
// Restore last active buffer
|
||||||
|
Loading…
Reference in New Issue
Block a user