| 167 | } |
| 168 | |
| 169 | void EditorLog::_save_state() { |
| 170 | Ref<ConfigFile> config; |
| 171 | config.instantiate(); |
| 172 | // Load and amend existing config if it exists. |
| 173 | config->load(EditorPaths::get_singleton()->get_project_settings_dir().path_join("editor_layout.cfg")); |
| 174 | |
| 175 | const String section = "editor_log"; |
| 176 | for (const KeyValue<MessageType, LogFilter *> &E : type_filter_map) { |
| 177 | config->set_value(section, "log_filter_" + itos(E.key), E.value->is_active()); |
| 178 | } |
| 179 | |
| 180 | config->set_value(section, "collapse", collapse); |
| 181 | config->set_value(section, "show_search", search_box->is_visible()); |
| 182 | |
| 183 | config->save(EditorPaths::get_singleton()->get_project_settings_dir().path_join("editor_layout.cfg")); |
| 184 | } |
| 185 | |
| 186 | void EditorLog::_load_state() { |
| 187 | is_loading_state = true; |
nothing calls this directly
no test coverage detected