summaryrefslogtreecommitdiffstats
path: root/editor/editor_settings.cpp
diff options
context:
space:
mode:
authorYuri Sizov <yuris@humnom.net>2023-07-26 18:39:22 +0200
committerYuri Sizov <yuris@humnom.net>2023-07-26 18:39:22 +0200
commit92960b7a22dabe26bb724b7b0d00a5fd03324f3a (patch)
tree4c0c3cf16d17f8727f332cf399cfccbbc92e4e24 /editor/editor_settings.cpp
parentc4e582262fa45483b1d68c5e7fa05351070355a0 (diff)
parentcac4d44cdef05e2f12f780e10be29ca489373893 (diff)
downloadredot-engine-92960b7a22dabe26bb724b7b0d00a5fd03324f3a.tar.gz
Merge pull request #78615 from RandomShaper/fix_doc_cache
Re-enable docs cache with fixes
Diffstat (limited to 'editor/editor_settings.cpp')
-rw-r--r--editor/editor_settings.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index 4398423529..285be7e7ae 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -878,6 +878,13 @@ EditorSettings *EditorSettings::get_singleton() {
return singleton.ptr();
}
+void EditorSettings::ensure_class_registered() {
+ ClassDB::APIType prev_api = ClassDB::get_current_api();
+ ClassDB::set_current_api(ClassDB::API_EDITOR);
+ GDREGISTER_CLASS(EditorSettings); // Otherwise it can't be unserialized.
+ ClassDB::set_current_api(prev_api);
+}
+
void EditorSettings::create() {
// IMPORTANT: create() *must* create a valid EditorSettings singleton,
// as the rest of the engine code will assume it. As such, it should never
@@ -888,7 +895,7 @@ void EditorSettings::create() {
return;
}
- GDREGISTER_CLASS(EditorSettings); // Otherwise it can't be unserialized.
+ ensure_class_registered();
String config_file_path;
Ref<ConfigFile> extra_config = memnew(ConfigFile);