From 6ed456cfdf81290afcbe31c020ae51d8ca365c65 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Mon, 20 Nov 2006 17:10:44 +0000 Subject: [PATCH] Fix full screen repaint on Buffer-load. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15999 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/BufferView.C | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/BufferView.C b/src/BufferView.C index a9148643b7..9c0b961567 100644 --- a/src/BufferView.C +++ b/src/BufferView.C @@ -197,9 +197,6 @@ void BufferView::setBuffer(Buffer * b) } } - // FIXME: in principle, a simple call to updateMetrics(false) should - // be enough here. But, for unknown reason, it seems that only the line - // of the cursor is updated in the CoordCache. if (buffer_) updateMetrics(false); @@ -282,7 +279,9 @@ bool BufferView::loadLyXFile(string const & filename, bool tolastfiles) if (it.pit() == pit) { // restored pos may be bigger than it->size setCursor(makeDocIterator(it, min(pos, it->size()))); - update(Update::FitCursor); + // No need to update the metrics if fitCursor returns false. + if (fitCursor()) + updateMetrics(false); break; } } -- 2.39.2