mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-11 11:08:41 +00:00
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:
parent
2d33ec0f5d
commit
8106f1809f
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user