Merge pull request #7349 from volzhs/fix-richtextlabel

Fix duplicated string on RichTextLabel if starts with '\n'
This commit is contained in:
Rémi Verschelde 2016-12-23 16:00:21 +01:00 committed by GitHub
commit 0f76c47be3

View file

@ -1179,6 +1179,7 @@ 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);
if (item->type!=ITEM_NEWLINE)
current_frame->lines[current_frame->lines.size()-1].from=item;
_invalidate_current_line(current_frame);