summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-09-25 23:08:48 +0200
committerGitHub <noreply@github.com>2017-09-25 23:08:48 +0200
commit7bb9a26de383d811cb6a8bc3f8fac7008f58acc9 (patch)
tree56b7c57ec7db64c6832e29fb42dd32a9a8a8092f /scene
parent25264568076c4aaea1319c941fdc64bd28d4c078 (diff)
parent5815aaa0353cddbca8067b0b061179d23162974c (diff)
Merge pull request #11546 from Paulb23/scrollbar_jitter
Fixed scrollbar Jitter when clicking [ci skip]
Diffstat (limited to 'scene')
-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);