summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-08-07 22:51:30 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-08-07 22:51:30 -0300
commitf6ad0ccc63189958c87fdcd2fa03aa208ff98bd9 (patch)
treecee40ceb97058c3317f35d74762225188a8bc8aa /editor
parent2a6cdfaf912c9b0903903e3fc035f7c708cb9ae0 (diff)
-Errors are printed again to Output, after a long time. Fixes #3373
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_log.cpp29
1 files 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<Texture> 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<Texture> 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<Texture>());
}
- log->add_newline();
log->add_text(p_msg);
//button->set_text(p_msg);