浏览代码

Set max value of inactive TextEdit scrolls to 0

(cherry picked from commit 892d93759c5dddc9af4e57deec2e3613909d8cc8)
kobewi 3 年之前
父节点
当前提交
63799b2a8e
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      scene/gui/text_edit.cpp

+ 2 - 0
scene/gui/text_edit.cpp

@@ -382,6 +382,7 @@ void TextEdit::_update_scrollbars() {
 		cursor.line_ofs = 0;
 		cursor.wrap_ofs = 0;
 		v_scroll->set_value(0);
+		v_scroll->set_max(0);
 		v_scroll->hide();
 	}
 
@@ -399,6 +400,7 @@ void TextEdit::_update_scrollbars() {
 	} else {
 		cursor.x_ofs = 0;
 		h_scroll->set_value(0);
+		h_scroll->set_max(0);
 		h_scroll->hide();
 	}