From c66d8cf51fc7e7f326310785470c74a9705a0072 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 20 Dec 2002 11:11:27 +0000 Subject: Added moveThumb argument to ScrollTo to allow smoother manipulation of thumb on GTK+ --- src/Editor.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/Editor.cxx') diff --git a/src/Editor.cxx b/src/Editor.cxx index 4c5ab8f41..92b0f0057 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -880,7 +880,7 @@ void Editor::SetLastXChosen() { lastXChosen = pt.x; } -void Editor::ScrollTo(int line) { +void Editor::ScrollTo(int line, bool moveThumb) { int topLineNew = Platform::Clamp(line, 0, MaxScrollPos()); if (topLineNew != topLine) { // Try to optimise small scrolls @@ -893,7 +893,9 @@ void Editor::ScrollTo(int line) { } else { Redraw(); } - SetVerticalScrollPos(); + if (moveThumb) { + SetVerticalScrollPos(); + } } } -- cgit v1.2.3