Skip to content

Commit

Permalink
Merge pull request #22310 from groud/remove_unsplit_mode
Browse files Browse the repository at this point in the history
Remove auto disabling of the split-view in the FileSystem dock
  • Loading branch information
akien-mga authored Sep 21, 2018
2 parents 534b7ef + f19dfc1 commit 94403af
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion editor/editor_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,6 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {

_initial_set("docks/filesystem/display_mode", 0);
hints["docks/filesystem/display_mode"] = PropertyInfo(Variant::INT, "docks/filesystem/display_mode", PROPERTY_HINT_ENUM, "Tree only, Split");
_initial_set("docks/filesystem/split_mode_minimum_height", 600);
_initial_set("docks/filesystem/thumbnail_size", 64);
hints["docks/filesystem/thumbnail_size"] = PropertyInfo(Variant::INT, "docks/filesystem/thumbnail_size", PROPERTY_HINT_RANGE, "32,128,16");
_initial_set("docks/filesystem/files_display_mode", 0);
Expand Down
4 changes: 1 addition & 3 deletions editor/filesystem_dock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,9 @@ void FileSystemDock::_update_tree(const Vector<String> p_uncollapsed_paths, bool
}

void FileSystemDock::_update_display_mode() {
bool compact_mode = get_size().height < int(EditorSettings::get_singleton()->get("docks/filesystem/split_mode_minimum_height"));

// Compute the new display mode
DisplayMode new_display_mode;
if ((display_mode_setting == DISPLAY_MODE_SETTING_TREE_ONLY) || compact_mode) {
if (display_mode_setting == DISPLAY_MODE_SETTING_TREE_ONLY) {
new_display_mode = file_list_view ? DISPLAY_MODE_FILE_LIST_ONLY : DISPLAY_MODE_TREE_ONLY;
} else {
new_display_mode = DISPLAY_MODE_SPLIT;
Expand Down

0 comments on commit 94403af

Please sign in to comment.