Fix duplicated string on RichTextLabel if starts with '\n'
Fix #6212, #3773
This commit is contained in:
parent
2c8a172915
commit
0ecc968c5c
1 changed files with 2 additions and 1 deletions
|
@ -1179,7 +1179,8 @@ void RichTextLabel::add_text(const String& p_text) {
|
||||||
item->line=current_frame->lines.size();
|
item->line=current_frame->lines.size();
|
||||||
_add_item(item,false);
|
_add_item(item,false);
|
||||||
current_frame->lines.resize(current_frame->lines.size()+1);
|
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);
|
_invalidate_current_line(current_frame);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue