mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Move editor paths into the EditorPaths class
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#include "core/os/keyboard.h"
|
||||
#include "core/version.h"
|
||||
#include "editor/editor_node.h"
|
||||
#include "editor/editor_paths.h"
|
||||
#include "editor/editor_scale.h"
|
||||
#include "scene/gui/center_container.h"
|
||||
#include "scene/resources/font.h"
|
||||
@@ -122,7 +123,7 @@ void EditorLog::_save_state() {
|
||||
Ref<ConfigFile> config;
|
||||
config.instantiate();
|
||||
// Load and amend existing config if it exists.
|
||||
config->load(EditorSettings::get_singleton()->get_project_settings_dir().plus_file("editor_layout.cfg"));
|
||||
config->load(EditorPaths::get_singleton()->get_project_settings_dir().plus_file("editor_layout.cfg"));
|
||||
|
||||
const String section = "editor_log";
|
||||
for (const KeyValue<MessageType, LogFilter *> &E : type_filter_map) {
|
||||
@@ -132,7 +133,7 @@ void EditorLog::_save_state() {
|
||||
config->set_value(section, "collapse", collapse);
|
||||
config->set_value(section, "show_search", search_box->is_visible());
|
||||
|
||||
config->save(EditorSettings::get_singleton()->get_project_settings_dir().plus_file("editor_layout.cfg"));
|
||||
config->save(EditorPaths::get_singleton()->get_project_settings_dir().plus_file("editor_layout.cfg"));
|
||||
}
|
||||
|
||||
void EditorLog::_load_state() {
|
||||
@@ -140,7 +141,7 @@ void EditorLog::_load_state() {
|
||||
|
||||
Ref<ConfigFile> config;
|
||||
config.instantiate();
|
||||
config->load(EditorSettings::get_singleton()->get_project_settings_dir().plus_file("editor_layout.cfg"));
|
||||
config->load(EditorPaths::get_singleton()->get_project_settings_dir().plus_file("editor_layout.cfg"));
|
||||
|
||||
// Run the below code even if config->load returns an error, since we want the defaults to be set even if the file does not exist yet.
|
||||
const String section = "editor_log";
|
||||
|
||||
Reference in New Issue
Block a user