From 5815aaa0353cddbca8067b0b061179d23162974c Mon Sep 17 00:00:00 2001 From: Paulb23 Date: Sun, 24 Sep 2017 16:19:52 +0100 Subject: Fixed scrollbar jitter when clicking --- scene/gui/scroll_bar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/gui/scroll_bar.cpp b/scene/gui/scroll_bar.cpp index 41f4beb1c9..6044b86ef5 100644 --- a/scene/gui/scroll_bar.cpp +++ b/scene/gui/scroll_bar.cpp @@ -343,7 +343,7 @@ void ScrollBar::_notification(int p_what) { double dist = sqrt(target * target); double vel = ((target / dist) * 500) * get_fixed_process_delta_time(); - if (vel >= dist) { + if (Math::abs(vel) >= dist) { set_value(target_scroll); } else { set_value(get_value() + vel); -- cgit v1.2.3