mirror of
https://github.com/godotengine/godot.git
synced 2024-12-15 10:12:40 +08:00
Merge pull request #48970 from EricEzaM/more-editor-log-fixes
Fixed editor log collapsing of duplicate messages not working
This commit is contained in:
commit
97d433a272
@ -234,7 +234,9 @@ void EditorLog::_add_log_line(LogMessage &p_message, bool p_replace_previous) {
|
||||
|
||||
if (p_replace_previous) {
|
||||
// Remove last line if replacing, as it will be replace by the next added line.
|
||||
log->remove_line(log->get_line_count() - 1);
|
||||
// Why - 2? RichTextLabel is weird. When you add a line, it also adds a NEW line, which is null,
|
||||
// but it still counts as a line. So if you remove the last line (count - 1) you are actually removing nothing...
|
||||
log->remove_line(log->get_line_count() - 2);
|
||||
log->increment_line_count();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user