diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2016-12-23 16:00:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-23 16:00:21 +0100 |
commit | 0f76c47be3496ca0b16ab573e08075f82e76a8c5 (patch) | |
tree | 7f4fd9a46e5c63217c66ceecd2c12d6bb28e0900 /scene/gui | |
parent | d1e3c0f0170396933b1701479282073baae6f145 (diff) | |
parent | 0ecc968c5c7593227d048e8c6020ed1a24ae52c1 (diff) |
Merge pull request #7349 from volzhs/fix-richtextlabel
Fix duplicated string on RichTextLabel if starts with '\n'
Diffstat (limited to 'scene/gui')
-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 73a3cda5f3..9283d42c05 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -1179,7 +1179,8 @@ void RichTextLabel::add_text(const String& p_text) { item->line=current_frame->lines.size(); _add_item(item,false); current_frame->lines.resize(current_frame->lines.size()+1); - current_frame->lines[current_frame->lines.size()-1].from=item; + if (item->type!=ITEM_NEWLINE) + current_frame->lines[current_frame->lines.size()-1].from=item; _invalidate_current_line(current_frame); } |