From f51ce0f7b142a47cca0964f313ebe031eddf8df1 Mon Sep 17 00:00:00 2001 From: Kellam Spencer Date: Fri, 5 Oct 2018 16:50:49 -0400 Subject: [PATCH] Fix to scrolling, rounding error on max_v_scroll --- scene/gui/text_edit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index c390c60a8cd..df0798b42c4 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);