diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-11-02 07:56:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-02 07:56:41 +0100 |
commit | 4b477263a7c72c50a90e6b83cabfe8a04bfce9a2 (patch) | |
tree | e280a3e9b30579b013fc171039e4151030908bd5 | |
parent | 79f81b77e2160fd4fb490b9e8e05636de70174bf (diff) | |
parent | 6ba94cb9249c6a4823625067dbae1e3bfd30c3e6 (diff) |
Merge pull request #12575 from leezh/richtext_newline_fix
Fixed RichTextLabel::add_newline() Fixes #12564
-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) { |