mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 03:11:59 +00:00
* src/bufferlist.C
(BufferList::close): Don't ignore unsaved changes if quitting == true (BufferList::close): Use menuWrite(buf) instead of buf->save(), because menuWrite tells the user if the file could not be saved and asks for another name git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14475 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
04986c096a
commit
3adfeaa2c7
@ -173,8 +173,7 @@ bool BufferList::close(Buffer * buf, bool const ask)
|
||||
{
|
||||
BOOST_ASSERT(buf);
|
||||
|
||||
// FIXME: is the quitting check still necessary ?
|
||||
if (!ask || buf->isClean() || quitting || buf->paragraphs().empty()) {
|
||||
if (!ask || buf->isClean() || buf->paragraphs().empty()) {
|
||||
release(buf);
|
||||
return true;
|
||||
}
|
||||
@ -195,14 +194,12 @@ bool BufferList::close(Buffer * buf, bool const ask)
|
||||
if (buf->isUnnamed()) {
|
||||
if (!writeAs(buf))
|
||||
return false;
|
||||
} else if (buf->save()) {
|
||||
LyX::ref().session().addLastFile(buf->fileName());
|
||||
} else {
|
||||
} else if (!menuWrite(buf))
|
||||
return false;
|
||||
}
|
||||
} else if (ret == 2) {
|
||||
else
|
||||
return false;
|
||||
} else if (ret == 2)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (buf->isUnnamed()) {
|
||||
removeAutosaveFile(buf->fileName());
|
||||
|
Loading…
Reference in New Issue
Block a user