Browse Source

Merge pull request #56637 from KoBeWi/maxxxxxxcroll

Set max value of inactive TextEdit scrolls to 0
Rémi Verschelde 3 years ago
parent
commit
b52f90e795
1 changed files with 2 additions and 0 deletions
  1. 2 0
      scene/gui/text_edit.cpp

+ 2 - 0
scene/gui/text_edit.cpp

@@ -5949,6 +5949,7 @@ void TextEdit::_update_scrollbars() {
 		caret.line_ofs = 0;
 		caret.line_ofs = 0;
 		caret.wrap_ofs = 0;
 		caret.wrap_ofs = 0;
 		v_scroll->set_value(0);
 		v_scroll->set_value(0);
+		v_scroll->set_max(0);
 		v_scroll->hide();
 		v_scroll->hide();
 	}
 	}
 
 
@@ -5966,6 +5967,7 @@ void TextEdit::_update_scrollbars() {
 	} else {
 	} else {
 		caret.x_ofs = 0;
 		caret.x_ofs = 0;
 		h_scroll->set_value(0);
 		h_scroll->set_value(0);
+		h_scroll->set_max(0);
 		h_scroll->hide();
 		h_scroll->hide();
 	}
 	}