Optimize buffer-switch: do first updateLabels() on opening instead of at each buffer switching.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16645 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2007-01-11 08:34:23 +00:00
parent 2d33ec0f5d
commit 8106f1809f

View File

@ -188,7 +188,6 @@ void BufferView::setBuffer(Buffer * b)
<< "Buffer addr: " << buffer_ << endl;
cursor_.push(buffer_->inset());
cursor_.resetAnchor();
updateLabels(*buffer_);
buffer_->text().setCurrentFont(cursor_);
if (buffer_->getCursor().size() > 0 &&
buffer_->getAnchor().size() > 0)
@ -258,6 +257,8 @@ bool BufferView::loadLyXFile(FileName const & filename, bool tolastfiles)
// Send the "errors" signal in case of parsing errors
b->errors("Parse");
// Update the labels and section numbering.
updateLabels(*buffer_);
// scroll to the position when the file was last closed
if (lyxrc.use_lastfilepos) {
pit_type pit;