diff options
author | Zher Huei Lee <lee.zh.92@gmail.com> | 2017-11-02 08:46:28 +0800 |
---|---|---|
committer | Zher Huei Lee <lee.zh.92@gmail.com> | 2017-11-02 08:46:28 +0800 |
commit | 6ba94cb9249c6a4823625067dbae1e3bfd30c3e6 (patch) | |
tree | c19e1a38075c5c413ec3fb2f27f033136dc45f4a /scene | |
parent | 93a3d1714ee9b1535ac8f902bd7b2b3135712b90 (diff) |
Fixed RichTextLabel::add_newline() #12564
Diffstat (limited to 'scene')
-rw-r--r-- | scene/gui/rich_text_label.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index ad519d8d0c..65a8350bd3 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) { |