mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
a little bit saver buffer closing
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@792 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
609a11852e
commit
2f08c88821
@ -1,3 +1,7 @@
|
||||
2000-06-05 Lars Gullik Bjønnes <larsbj@lyx.org>
|
||||
|
||||
* src/bufferlist.C (close): test of buf->getuser() == NULL
|
||||
|
||||
2000-06-02 Dekel Tsur <dekel@math.tau.ac.il>
|
||||
|
||||
* src/BufferView2.C (removeAutoInsets): Fix a bug:
|
||||
|
@ -151,10 +151,13 @@ void BufferList::resize()
|
||||
|
||||
bool BufferList::close(Buffer * buf)
|
||||
{
|
||||
if (buf->getUser()) buf->getUser()->insetUnlock();
|
||||
// CHECK
|
||||
// Trace back why we need to use buf->getUser here.
|
||||
// Perhaps slight rewrite is in order? (Lgb)
|
||||
|
||||
if (buf->getUser()) buf->getUser()->insetUnlock();
|
||||
if (buf->paragraph && !buf->isLyxClean() && !quitting) {
|
||||
ProhibitInput(buf->getUser());
|
||||
if (buf->getUser()) ProhibitInput(buf->getUser());
|
||||
switch(AskConfirmation(_("Changes in document:"),
|
||||
MakeDisplayPath(buf->fileName(), 50),
|
||||
_("Save document?"))){
|
||||
@ -162,15 +165,15 @@ bool BufferList::close(Buffer * buf)
|
||||
if (buf->save()) {
|
||||
lastfiles->newFile(buf->fileName());
|
||||
} else {
|
||||
AllowInput(buf->getUser());
|
||||
if (buf->getUser()) AllowInput(buf->getUser());
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case 3: // Cancel
|
||||
AllowInput(buf->getUser());
|
||||
if (buf->getUser()) AllowInput(buf->getUser());
|
||||
return false;
|
||||
}
|
||||
AllowInput(buf->getUser());
|
||||
if (buf->getUser()) AllowInput(buf->getUser());
|
||||
}
|
||||
|
||||
bstore.release(buf);
|
||||
|
Loading…
Reference in New Issue
Block a user