Ver Fonte

Set max value of inactive TextEdit scrolls to 0

(cherry picked from commit 892d93759c5dddc9af4e57deec2e3613909d8cc8)
kobewi há 3 anos atrás
pai
commit
63799b2a8e
1 ficheiros alterados com 2 adições e 0 exclusões
  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();
 	}