mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-27 22:41:09 +00:00
Fix bug 4750
* src/frontends/qt4/GuiView.{cpp,h}: - (closeBuffer): only add buffer to list of last opened files if close buffer is called from within GuiView::closeEvent * src/Session.cpp: typo. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24384 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
69f1cd1e50
commit
4d88adcde5
@ -3,7 +3,7 @@
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author Lars Gullik Bjønnes
|
||||
* \author Lars Gullik Bjønnes
|
||||
* \author Bo Peng
|
||||
*
|
||||
* Full author contact details are available in file CREDITS.
|
||||
|
@ -411,7 +411,7 @@ void GuiView::closeEvent(QCloseEvent * close_event)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (b && !closeBuffer(*b)) {
|
||||
if (b && !closeBuffer(*b, true)) {
|
||||
close_event->ignore();
|
||||
return;
|
||||
}
|
||||
@ -1605,7 +1605,7 @@ bool GuiView::closeBuffer()
|
||||
}
|
||||
|
||||
|
||||
bool GuiView::closeBuffer(Buffer & buf)
|
||||
bool GuiView::closeBuffer(Buffer & buf, bool tolastopened)
|
||||
{
|
||||
// goto bookmark to update bookmark pit.
|
||||
//FIXME: we should update only the bookmarks related to this buffer!
|
||||
@ -1613,7 +1613,7 @@ bool GuiView::closeBuffer(Buffer & buf)
|
||||
theLyXFunc().gotoBookmark(i+1, false, false);
|
||||
|
||||
if (buf.isClean() || buf.paragraphs().empty()) {
|
||||
if (buf.masterBuffer() == &buf)
|
||||
if (buf.masterBuffer() == &buf && tolastopened)
|
||||
LyX::ref().session().lastOpened().add(buf.fileName());
|
||||
theBufferList().release(&buf);
|
||||
return true;
|
||||
@ -1655,7 +1655,7 @@ bool GuiView::closeBuffer(Buffer & buf)
|
||||
// save file names to .lyx/session
|
||||
// if master/slave are both open, do not save slave since it
|
||||
// will be automatically loaded when the master is loaded
|
||||
if (buf.masterBuffer() == &buf)
|
||||
if (buf.masterBuffer() == &buf && tolastopened)
|
||||
LyX::ref().session().lastOpened().add(buf.fileName());
|
||||
|
||||
theBufferList().release(&buf);
|
||||
|
@ -276,7 +276,7 @@ private:
|
||||
///
|
||||
bool saveBuffer(Buffer & b);
|
||||
///
|
||||
bool closeBuffer(Buffer & buf);
|
||||
bool closeBuffer(Buffer & buf, bool tolastopened = false);
|
||||
|
||||
///
|
||||
Inset * getOpenInset(std::string const & name) const;
|
||||
|
Loading…
Reference in New Issue
Block a user