The attached patch collapses 'REFRESH_AREA' and 'REFRESH_ROW' handling.
Goal is still simple two-phase drawing with 'redraw everything'.

I don't see any noticable sluggishness when jumping around in the
UserGuide (was to be expected I think)

Incidentally, this fixes the redraw bug when clicking to the right of a
displayed formula and typing there.

Ok?

Andre'

-- 
Those who desire to give up Freedom in order to gain Security, will not have,
nor do they deserve, either one.     (T. Jefferson or B. Franklin or both...)
Index: frontends/screen.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/screen.C,v
retrieving revision 1.47
diff -u -p -r1.47 screen.C
--- frontends/screen.C  14 Jul 2003 17:49:59 -0000      1.47
+++ frontends/screen.C  15 Jul 2003 09:05:58 -0000
@@ -313,28 +313,15 @@ void LyXScreen::update(BufferView & bv, 
        workarea().getPainter().start();
 
        switch (text->refreshStatus()) {
+       case LyXText::REFRESH_ROW:
        case LyXText::REFRESH_AREA:
        {
                text->updateRowPositions();
                int const y = max(int(text->refresh_y - text->top_y()), 0);
                drawFromTo(text, &bv, y, vheight, yo, xo);
                expose(0, y, vwidth, vheight - y);
+               break;
        }
-       break;
-       case LyXText::REFRESH_ROW:
-       {
-               text->updateRowPositions();
-               // ok I will update the current cursor row
-               drawOneRow(text, &bv, text->refresh_row, text->refresh_y,
-                          yo, xo);
-               // this because if we had a major update the refresh_row could
-               // have been set to 0!
-               if (text->refresh_row != text->rows().end()) {
-                       expose(0, text->refresh_y - text->top_y() + yo,
-                                  vwidth, text->refresh_row->height());
-               }
-       }
-       break;
        case LyXText::REFRESH_NONE:
                // Nothing needs done
                break;
@@ -491,20 +478,3 @@ void LyXScreen::drawFromTo(LyXText * tex
        }
 }
 
-
-void LyXScreen::drawOneRow(LyXText * text, BufferView * bv,
-                          RowList::iterator row,
-       int y_text, int yo, int xo)
-{
-       int const y = y_text - text->top_y() + yo;
-
-       if (y + row->height() <= 0)
-               return;
-
-       if (y - row->height() > workarea().workHeight())
-               return;
-
-       hideCursor();
-
-       paintRows(*bv, *text, row, y, xo, y + text->top_y());
-}

Reply via email to