From f6ad0ccc63189958c87fdcd2fa03aa208ff98bd9 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Mon, 7 Aug 2017 22:51:30 -0300 Subject: -Errors are printed again to Output, after a long time. Fixes #3373 --- editor/editor_log.cpp | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/editor/editor_log.cpp b/editor/editor_log.cpp index addffd6ea3..91b6cbb3ea 100644 --- a/editor/editor_log.cpp +++ b/editor/editor_log.cpp @@ -52,31 +52,6 @@ void EditorLog::_error_handler(void *p_self, const char *p_func, const char *p_f */ err_str = " " + err_str; - self->log->add_newline(); - - Ref icon; - - switch (p_type) { - case ERR_HANDLER_ERROR: { - - icon = self->get_icon("Error", "EditorIcons"); - return; // these are confusing - } break; - case ERR_HANDLER_WARNING: { - - icon = self->get_icon("Error", "EditorIcons"); - - } break; - case ERR_HANDLER_SCRIPT: { - - icon = self->get_icon("ScriptError", "EditorIcons"); - } break; - case ERR_HANDLER_SHADER: { - - icon = self->get_icon("Shader", "EditorIcons"); - } break; - } - self->add_message(err_str, true); } @@ -114,16 +89,16 @@ void EditorLog::clear() { void EditorLog::add_message(const String &p_msg, bool p_error) { + log->add_newline(); if (p_error) { + log->push_color(get_color("fg_error", "Editor")); Ref icon = get_icon("Error", "EditorIcons"); log->add_image(icon); //button->set_icon(icon); - log->push_color(get_color("fg_error", "Editor")); } else { //button->set_icon(Ref()); } - log->add_newline(); log->add_text(p_msg); //button->set_text(p_msg); -- cgit v1.2.3