summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKellam Spencer <kellam.hi@gmail.com>2018-10-05 16:50:49 -0400
committerKellam Spencer <kellam.hi@gmail.com>2018-10-05 16:50:49 -0400
commitf51ce0f7b142a47cca0964f313ebe031eddf8df1 (patch)
treedf58d7edcfc9397a779f35c5cb781802537f0ebf
parent8068d0217a5e74c25f83fe93fa6e077b8d0b3bf5 (diff)
Fix to scrolling, rounding error on max_v_scroll
-rw-r--r--scene/gui/text_edit.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index c390c60a8c..df0798b42c 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -3260,7 +3260,7 @@ void TextEdit::_scroll_down(real_t p_delta) {
}
if (smooth_scroll_enabled) {
- int max_v_scroll = v_scroll->get_max() - v_scroll->get_page();
+ int max_v_scroll = round(v_scroll->get_max() - v_scroll->get_page());
if (target_v_scroll > max_v_scroll) {
target_v_scroll = max_v_scroll;
v_scroll->set_value(target_v_scroll);