From b8c52f16e2a7858e32a9889aa760f5c75cb26a00 Mon Sep 17 00:00:00 2001 From: wareya Date: Mon, 6 Jan 2025 05:09:43 -0500 Subject: [PATCH] Fix large LineEdit x resize perf when wrapping disabled --- scene/gui/text_edit.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 1fbd2c48c0f..3bd0a1322b8 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -7955,12 +7955,13 @@ void TextEdit::_update_wrap_at_column(bool p_force) { } text.set_brk_flags(autowrap_flags); text.set_width(wrap_at_column); - } else { + text.invalidate_all_lines(); + _update_placeholder(); + } else if (text.get_width() != -1) { text.set_width(-1); + text.invalidate_all_lines(); + _update_placeholder(); } - - text.invalidate_all_lines(); - _update_placeholder(); } // Update viewport.