mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 19:25:39 +00:00
Accept dirty buffer if the document has not been saved to disk (part of bug 6645).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34114 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
19947bfc83
commit
5aa69caae5
@ -61,10 +61,12 @@ Buffer * checkAndLoadLyXFile(FileName const & filename, bool const acceptDirty)
|
||||
// File already open?
|
||||
Buffer * checkBuffer = theBufferList().getBuffer(filename);
|
||||
if (checkBuffer) {
|
||||
// sometimes (when setting the master buffer from a child)
|
||||
// Sometimes (when setting the master buffer from a child)
|
||||
// we accept a dirty buffer right away (otherwise we'd get
|
||||
// an infinite loop (bug 5514)
|
||||
if (checkBuffer->isClean() || acceptDirty)
|
||||
// an infinite loop (bug 5514).
|
||||
// We also accept a dirty buffer when the document has not
|
||||
// yet been saved to disk.
|
||||
if (checkBuffer->isClean() || acceptDirty || !filename.exists())
|
||||
return checkBuffer;
|
||||
docstring const file = makeDisplayPath(filename.absFilename(), 20);
|
||||
docstring const text = bformat(_(
|
||||
|
Loading…
Reference in New Issue
Block a user