From: Abdelrazak Younes Date: Thu, 19 Jun 2008 13:10:25 +0000 (+0000) Subject: Fix initial cursor visibility problem. X-Git-Tag: 1.6.10~4331 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=f29a8f54a4739ec6eea501e5e8ad9f01fb114a14;p=features.git Fix initial cursor visibility problem. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25322 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/BufferView.cpp b/src/BufferView.cpp index 4d0a1caad2..8998405e84 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -457,7 +457,7 @@ void BufferView::processUpdateFlags(Update::flags flags) void BufferView::updateScrollbar() { - if (height_ == 0) + if (height_ == 0 && width_ == 0) return; // We prefer fixed size line scrolling. @@ -1864,6 +1864,9 @@ bool BufferView::singleParUpdate() void BufferView::updateMetrics() { + if (height_ == 0 || width_ == 0) + return; + Text & buftext = buffer_.text(); pit_type const npit = int(buftext.paragraphs().size()); @@ -2089,6 +2092,8 @@ Point BufferView::getPos(DocIterator const & dit, bool boundary) const void BufferView::draw(frontend::Painter & pain) { + if (height_ == 0 || width_ == 0) + return; LYXERR(Debug::PAINTING, "\t\t*** START DRAWING ***"); Text & text = buffer_.text(); TextMetrics const & tm = d->text_metrics_[&text];