diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index a7d437ea5..7769f7330 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -432,7 +432,7 @@ void EditorSettings::_load_defaults(Ref p_extra_config) { hints["docks/filesystem/dock_mode"] = PropertyInfo(Variant::INT, "docks/filesystem/dock_mode", PROPERTY_HINT_ENUM, "Dock,Bottom Bar", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED); _initial_set("docks/filesystem/split_mode", 0); - hints["docks/filesystem/split_mode"] = PropertyInfo(Variant::INT, "docks/filesystem/split_mode", PROPERTY_HINT_ENUM, "Vertical,Horizontal", PROPERTY_USAGE_DEFAULT); + hints["docks/filesystem/split_mode"] = PropertyInfo(Variant::INT, "docks/filesystem/split_mode", PROPERTY_HINT_ENUM, "Horizontal,Vertical", PROPERTY_USAGE_DEFAULT); // Property editor _initial_set("docks/property_editor/auto_refresh_interval", 0.3); diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index 3969814c3..165f5f8bc 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -467,6 +467,11 @@ void FileSystemDock::_notification(int p_what) { _update_file_list(true); } + SplitMode new_split_mode = SplitMode(int(EditorSettings::get_singleton()->get("docks/filesystem/split_mode"))); + if (new_split_mode != split_mode) { + set_split_mode(new_split_mode); + } + // Change full tree mode. _update_display_mode(); } break; @@ -2034,9 +2039,9 @@ void FileSystemDock::set_split_mode(SplitMode p_split_mode) { split_mode = p_split_mode; if (split_mode == SPLIT_MODE_HORIZONTAL) { - split_box->set_mode(CSplitContainer::CONTAINER_MODE_HORIZONTAL); - } else { split_box->set_mode(CSplitContainer::CONTAINER_MODE_VERTICAL); + } else { + split_box->set_mode(CSplitContainer::CONTAINER_MODE_HORIZONTAL); } } FileSystemDock::SplitMode FileSystemDock::get_split_mode() { diff --git a/editor/filesystem_dock.h b/editor/filesystem_dock.h index f17f9d990..1ce79fea6 100644 --- a/editor/filesystem_dock.h +++ b/editor/filesystem_dock.h @@ -86,8 +86,8 @@ public: }; enum SplitMode { + SPLIT_MODE_HORIZONTAL = 0, SPLIT_MODE_VERTICAL, - SPLIT_MODE_HORIZONTAL, }; enum DockMode {