summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorPaulb23 <p_batty@hotmail.co.uk>2017-09-24 16:19:52 +0100
committerPaulb23 <p_batty@hotmail.co.uk>2017-09-24 16:19:52 +0100
commit5815aaa0353cddbca8067b0b061179d23162974c (patch)
treefe1516f2fe2ffe02d24ed229a473b1b9fc5a18d8 /scene/gui
parent4ac7f5acf98ad08fb826979a0baa3d5e731a73a3 (diff)
Fixed scrollbar jitter when clicking
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/scroll_bar.cpp2
1 files changed, 1 insertions, 1 deletions
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);