diff options
author | SaracenOne <SaracenOne@gmail.com> | 2017-09-12 18:23:16 +0100 |
---|---|---|
committer | SaracenOne <SaracenOne@gmail.com> | 2017-09-12 18:23:16 +0100 |
commit | 7b5a1f6481b8df22ffb2dd2ec713b470ffc2a980 (patch) | |
tree | 93dfc779d3b034a1e3cf9acefb2d76bbecb1cc9c | |
parent | 50bc1f29220aafe073256d072e644bdfbcaace83 (diff) |
Add option to always show directories in filesystem dock
-rw-r--r-- | editor/editor_settings.cpp | 3 | ||||
-rw-r--r-- | editor/filesystem_dock.cpp | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index 50cee6d892..4e6659a298 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -729,6 +729,9 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { hints["docks/filesystem/display_mode"] = PropertyInfo(Variant::INT, "docks/filesystem/display_mode", PROPERTY_HINT_ENUM, "Thumbnails,List"); set("docks/filesystem/thumbnail_size", 64); hints["docks/filesystem/thumbnail_size"] = PropertyInfo(Variant::INT, "docks/filesystem/thumbnail_size", PROPERTY_HINT_RANGE, "32,128,16"); + set("docks/filesystem/display_mode", 0); + hints["docks/filesystem/display_mode"] = PropertyInfo(Variant::INT, "docks/filesystem/display_mode", PROPERTY_HINT_ENUM, "Thumbnails,List"); + set("docks/filesystem/always_show_folders", true); set("editors/animation/autorename_animation_tracks", true); set("editors/animation/confirm_insert_track", true); diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index a66d1724a1..84e0e0e3de 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -426,8 +426,10 @@ void FileSystemDock::_update_files(bool p_keep_selection) { Ref<Texture> file_thumbnail; Ref<Texture> file_thumbnail_broken; + bool always_show_folders = EditorSettings::get_singleton()->get("docks/filesystem/always_show_folders"); + bool use_thumbnails = (display_mode == DISPLAY_THUMBNAILS); - bool use_folders = search_box->get_text().length() == 0 && split_mode; + bool use_folders = search_box->get_text().length() == 0 && (split_mode || always_show_folders); if (use_thumbnails) { //thumbnails |