[RTL] Add pop_all, push_context and pop_context methods, and use it for print_rich to avoid unclosed tags.
This commit is contained in:
parent
85c9db592f
commit
5216a08617
4 changed files with 71 additions and 8 deletions
|
|
@ -338,13 +338,7 @@ void EditorLog::_add_log_line(LogMessage &p_message, bool p_replace_previous) {
|
|||
} else {
|
||||
log->add_text(p_message.text);
|
||||
}
|
||||
|
||||
// Need to use pop() to exit out of the RichTextLabels current "push" stack.
|
||||
// We only "push" in the above switch when message type != STD and RICH, so only pop when that is the case.
|
||||
if (p_message.type != MSG_TYPE_STD && p_message.type != MSG_TYPE_STD_RICH) {
|
||||
log->pop();
|
||||
}
|
||||
|
||||
log->pop_all(); // Pop all unclosed tags.
|
||||
log->add_newline();
|
||||
|
||||
if (p_replace_previous) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue