summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2016-12-23 16:00:21 +0100
committerGitHub <noreply@github.com>2016-12-23 16:00:21 +0100
commit0f76c47be3496ca0b16ab573e08075f82e76a8c5 (patch)
tree7f4fd9a46e5c63217c66ceecd2c12d6bb28e0900 /scene/gui
parentd1e3c0f0170396933b1701479282073baae6f145 (diff)
parent0ecc968c5c7593227d048e8c6020ed1a24ae52c1 (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.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 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);
}