summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorZher Huei Lee <lee.zh.92@gmail.com>2017-11-02 08:46:28 +0800
committerZher Huei Lee <lee.zh.92@gmail.com>2017-11-02 08:46:28 +0800
commit6ba94cb9249c6a4823625067dbae1e3bfd30c3e6 (patch)
treec19e1a38075c5c413ec3fb2f27f033136dc45f4a /scene/gui
parent93a3d1714ee9b1535ac8f902bd7b2b3135712b90 (diff)
Fixed RichTextLabel::add_newline() #12564
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/rich_text_label.cpp3
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) {