]> git.lyx.org Git - features.git/commitdiff
add delay if we have a selection going
authorLars Gullik Bjønnes <larsbj@gullik.org>
Tue, 3 Dec 2002 09:57:59 +0000 (09:57 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Tue, 3 Dec 2002 09:57:59 +0000 (09:57 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5767 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/ChangeLog
src/frontends/screen.C

index 64dff8903f0fb90dda5bd63d141a8842e2772197..c9d31306c0db5db155e5934ffa1c2f9e31fdd5e2 100644 (file)
@@ -1,3 +1,9 @@
+2002-12-03  Lars Gullik Bjønnes  <larsbj@gullik.net>
+
+       * screen.C (fitManualCursor): add delay if we have a selection
+       going 
+       (fitCursor): ditto
+
 2002-12-01  Lars Gullik Bjønnes  <larsbj@gullik.net>
 
        * several files: ws changes
index 74fa21184b591e47430dd3ed14eee7c75b99ec4d..403647da4d75b674ec9417303c71aaf385d1c7d6 100644 (file)
@@ -169,8 +169,13 @@ bool LyXScreen::fitManualCursor(BufferView * bv, LyXText * text,
        if (newtop != text->first_y) {
                draw(text, bv, newtop);
                text->first_y = newtop;
+               // Make the screen not scroll too fast when
+               // we have a selection.
+               if (text->selection.set())
+                       usleep(200000);
                return true;
        }
+
        return false;
 }
 
@@ -230,8 +235,14 @@ bool LyXScreen::fitCursor(LyXText * text, BufferView * bv)
        // Is a change necessary?
        int const newtop = topCursorVisible(text->cursor, text->first_y);
        bool const result = (newtop != text->first_y);
-       if (result)
+       if (result) {
                draw(text, bv, newtop);
+               // Make the screen not scroll too fast when
+               // we have a selection.
+               if (text->selection.set())
+                       usleep(200000);
+       }
+
        return result;
 }