浏览代码

Fix to scrolling, rounding error on max_v_scroll

Kellam Spencer 7 年之前
父节点
当前提交
f51ce0f7b1
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      scene/gui/text_edit.cpp

+ 1 - 1
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);