diff options
author | Paulb23 <p_batty@hotmail.co.uk> | 2017-09-24 16:19:52 +0100 |
---|---|---|
committer | Paulb23 <p_batty@hotmail.co.uk> | 2017-09-24 16:19:52 +0100 |
commit | 5815aaa0353cddbca8067b0b061179d23162974c (patch) | |
tree | fe1516f2fe2ffe02d24ed229a473b1b9fc5a18d8 /scene | |
parent | 4ac7f5acf98ad08fb826979a0baa3d5e731a73a3 (diff) |
Fixed scrollbar jitter when clicking
Diffstat (limited to 'scene')
-rw-r--r-- | scene/gui/scroll_bar.cpp | 2 |
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); |