1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-20 14:45:44 +00:00

ProjectSettings: Ensure 'editor/' settings aren't nested

Having a mix of settings with and without subcategory makes the 'Editor'
section stand out with a weird UX, as instead of simply being a foldable
section like the others, it also holds its own top-level settings and is
therefore selectable.

This wasn't the case in 3.4, and is fixed in 4.0 by refactoring, so for
3.5 we should preserve the 3.4 UX, even if it's not the best.
This commit is contained in:
Rémi Verschelde
2022-06-19 11:42:54 +02:00
parent 2e5d858928
commit acd4a01b8c
4 changed files with 18 additions and 12 deletions

View File

@@ -84,8 +84,8 @@ void VersionControlEditorPlugin::_bind_methods() {
void VersionControlEditorPlugin::_notification(int p_what) {
if (p_what == NOTIFICATION_READY) {
String installed_plugin = GLOBAL_GET("editor/version_control/plugin_name");
bool has_autoload_enable = GLOBAL_GET("editor/version_control/autoload_on_startup");
String installed_plugin = GLOBAL_GET("editor/version_control_plugin_name");
bool has_autoload_enable = GLOBAL_GET("editor/version_control_autoload_on_startup");
if (installed_plugin != "" && has_autoload_enable) {
if (_load_plugin(installed_plugin)) {
@@ -139,8 +139,8 @@ void VersionControlEditorPlugin::_initialize_vcs() {
if (_load_plugin(selected_plugin)) {
_set_up();
ProjectSettings::get_singleton()->set("editor/version_control/autoload_on_startup", true);
ProjectSettings::get_singleton()->set("editor/version_control/plugin_name", selected_plugin);
ProjectSettings::get_singleton()->set("editor/version_control_autoload_on_startup", true);
ProjectSettings::get_singleton()->set("editor/version_control_plugin_name", selected_plugin);
ProjectSettings::get_singleton()->save();
}
}