diff options
Diffstat (limited to 'editor/editor_log.cpp')
-rw-r--r-- | editor/editor_log.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/editor/editor_log.cpp b/editor/editor_log.cpp index d9ba4139c2..dbe44aee1b 100644 --- a/editor/editor_log.cpp +++ b/editor/editor_log.cpp @@ -38,7 +38,7 @@ #include "scene/resources/font.h" void EditorLog::_error_handler(void *p_self, const char *p_func, const char *p_file, int p_line, const char *p_error, const char *p_errorexp, bool p_editor_notify, ErrorHandlerType p_type) { - EditorLog *self = (EditorLog *)p_self; + EditorLog *self = static_cast<EditorLog *>(p_self); if (self->current != Thread::get_caller_id()) { return; } @@ -80,6 +80,11 @@ void EditorLog::_update_theme() { type_filter_map[MSG_TYPE_WARNING]->toggle_button->set_icon(get_theme_icon(SNAME("StatusWarning"), SNAME("EditorIcons"))); type_filter_map[MSG_TYPE_EDITOR]->toggle_button->set_icon(get_theme_icon(SNAME("Edit"), SNAME("EditorIcons"))); + type_filter_map[MSG_TYPE_STD]->toggle_button->set_theme_type_variation("EditorLogFilterButton"); + type_filter_map[MSG_TYPE_ERROR]->toggle_button->set_theme_type_variation("EditorLogFilterButton"); + type_filter_map[MSG_TYPE_WARNING]->toggle_button->set_theme_type_variation("EditorLogFilterButton"); + type_filter_map[MSG_TYPE_EDITOR]->toggle_button->set_theme_type_variation("EditorLogFilterButton"); + clear_button->set_icon(get_theme_icon(SNAME("Clear"), SNAME("EditorIcons"))); copy_button->set_icon(get_theme_icon(SNAME("ActionCopy"), SNAME("EditorIcons"))); collapse_button->set_icon(get_theme_icon(SNAME("CombineLines"), SNAME("EditorIcons"))); @@ -163,7 +168,7 @@ void EditorLog::_copy_request() { String text = log->get_selected_text(); if (text.is_empty()) { - text = log->get_text(); + text = log->get_parsed_text(); } if (!text.is_empty()) { @@ -211,7 +216,7 @@ void EditorLog::set_tool_button(Button *p_tool_button) { } void EditorLog::_undo_redo_cbk(void *p_self, const String &p_name) { - EditorLog *self = (EditorLog *)p_self; + EditorLog *self = static_cast<EditorLog *>(p_self); self->add_message(p_name, EditorLog::MSG_TYPE_EDITOR); } @@ -342,12 +347,13 @@ EditorLog::EditorLog() { log->set_focus_mode(FOCUS_CLICK); log->set_v_size_flags(SIZE_EXPAND_FILL); log->set_h_size_flags(SIZE_EXPAND_FILL); + log->set_deselect_on_focus_loss_enabled(false); vb_left->add_child(log); // Search box search_box = memnew(LineEdit); search_box->set_h_size_flags(Control::SIZE_EXPAND_FILL); - search_box->set_placeholder(TTR("Filter messages")); + search_box->set_placeholder(TTR("Filter Messages")); search_box->set_clear_button_enabled(true); search_box->set_visible(true); search_box->connect("text_changed", callable_mp(this, &EditorLog::_search_changed)); |