]> git.lyx.org Git - features.git/commitdiff
Fix initial cursor visibility problem.
authorAbdelrazak Younes <younes@lyx.org>
Thu, 19 Jun 2008 13:10:25 +0000 (13:10 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Thu, 19 Jun 2008 13:10:25 +0000 (13:10 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25322 a592a061-630c-0410-9148-cb99ea01b6c8

src/BufferView.cpp

index 4d0a1caad2ccb1d910f9872b0756676786cbf765..8998405e847b320d85710b158bbf62dc20fdd7b6 100644 (file)
@@ -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];