From 66a8ee71aa77971bc8c7a667224076665bfbe6dd Mon Sep 17 00:00:00 2001 From: kit Date: Mon, 27 May 2024 14:56:48 -0400 Subject: [PATCH] Fix TextEdit HScroll hiding after wrapping --- scene/gui/text_edit.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 69b84da23dfe..b542016ff26a 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -286,6 +286,7 @@ void TextEdit::Text::invalidate_all_lines() { } tab_size_dirty = false; + max_width = -1; _calculate_max_line_width(); } @@ -404,10 +405,12 @@ void TextEdit::Text::remove_range(int p_from_line, int p_to_line) { text.resize(text.size() - diff); if (dirty_height) { + line_height = -1; _calculate_line_height(); } if (dirty_width) { + max_width = -1; _calculate_max_line_width(); } }