fix bug 1694

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9090 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2004-10-15 08:27:59 +00:00
parent a23f710d55
commit ec733357e0
3 changed files with 26 additions and 9 deletions

View File

@ -35,12 +35,19 @@ src/frontends/gnome/GLog.C
src/frontends/gnome/support.c src/frontends/gnome/support.c
src/frontends/gtk/Dialogs.C src/frontends/gtk/Dialogs.C
src/frontends/gtk/GBC.h src/frontends/gtk/GBC.h
src/frontends/gtk/GChanges.C
src/frontends/gtk/GCharacter.C src/frontends/gtk/GCharacter.C
src/frontends/gtk/GErrorList.C
src/frontends/gtk/GLog.C
src/frontends/gtk/GMathDelim.C src/frontends/gtk/GMathDelim.C
src/frontends/gtk/GMathPanel.C src/frontends/gtk/GMathPanel.C
src/frontends/gtk/GMathsMatrix.C
src/frontends/gtk/GParagraph.C src/frontends/gtk/GParagraph.C
src/frontends/gtk/GSearch.C src/frontends/gtk/GSearch.C
src/frontends/gtk/GShowFile.C
src/frontends/gtk/GSpellchecker.C
src/frontends/gtk/GTableCreate.C src/frontends/gtk/GTableCreate.C
src/frontends/gtk/GTexinfo.C
src/frontends/gtk/GToc.C src/frontends/gtk/GToc.C
src/frontends/gtk/GUrl.C src/frontends/gtk/GUrl.C
src/frontends/qt2/Alert_pimpl.C src/frontends/qt2/Alert_pimpl.C

View File

@ -327,8 +327,17 @@ void BufferView::Pimpl::setBuffer(Buffer * b)
if (buffer_) if (buffer_)
disconnectBuffer(); disconnectBuffer();
// set current buffer // if we are closing current buffer, switch to the first in
buffer_ = b; // buffer list.
if (!b) {
lyxerr[Debug::INFO] << " No Buffer!" << endl;
// we are closing the buffer, use the first buffer as current
buffer_ = bufferlist.first();
owner_->getDialogs().hideBufferDependent();
} else {
// set current buffer
buffer_ = b;
}
// reset old cursor // reset old cursor
top_y_ = 0; top_y_ = 0;
@ -355,12 +364,7 @@ void BufferView::Pimpl::setBuffer(Buffer * b)
// hidden. This should go here because some dialogs (eg ToC) // hidden. This should go here because some dialogs (eg ToC)
// require bv_->text. // require bv_->text.
owner_->getDialogs().updateBufferDependent(true); owner_->getDialogs().updateBufferDependent(true);
} else { }
lyxerr[Debug::INFO] << " No Buffer!" << endl;
// we are closing the buffer, use the first buffer as current
buffer_ = bufferlist.first();
owner_->getDialogs().hideBufferDependent();
}
update(); update();
updateScrollbar(); updateScrollbar();

View File

@ -1,6 +1,12 @@
2004-10-14 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* BufferView_pimpl.C (setBuffer): when closing a buffer, make sure
the cursor is correct (bug 1694)
2004-10-13 José Matos <jamatos@lyx.org> 2004-10-13 José Matos <jamatos@lyx.org>
* output_docbook.C (docbookParagraphs): fix closing tags in the end of the document. * output_docbook.C (docbookParagraphs): fix closing tags in the
end of the document.
2004-10-09 José Matos <jamatos@lyx.org> 2004-10-09 José Matos <jamatos@lyx.org>