MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / _save_state

Method _save_state

editor/editor_log.cpp:169–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167}
168
169void 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
186void EditorLog::_load_state() {
187 is_loading_state = true;

Callers

nothing calls this directly

Calls 9

itosFunction · 0.85
path_joinMethod · 0.80
instantiateMethod · 0.45
loadMethod · 0.45
set_valueMethod · 0.45
is_activeMethod · 0.45
is_visibleMethod · 0.45
saveMethod · 0.45

Tested by

no test coverage detected