From 6ba94cb9249c6a4823625067dbae1e3bfd30c3e6 Mon Sep 17 00:00:00 2001 From: Zher Huei Lee Date: Thu, 2 Nov 2017 08:46:28 +0800 Subject: [PATCH] Fixed RichTextLabel::add_newline() #12564 --- scene/gui/rich_text_label.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index ad519d8d0cb..65a8350bd3b 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -1195,8 +1195,9 @@ void RichTextLabel::add_newline() { return; ItemNewline *item = memnew(ItemNewline); item->line = current_frame->lines.size(); - current_frame->lines.resize(current_frame->lines.size() + 1); _add_item(item, false); + current_frame->lines.resize(current_frame->lines.size() + 1); + _invalidate_current_line(current_frame); } bool RichTextLabel::remove_line(const int p_line) {