From 4fb56d6694ef65d4f978e135325a78592c88236a Mon Sep 17 00:00:00 2001 From: volzhs Date: Sun, 29 Dec 2019 04:07:56 +0900 Subject: [PATCH] Show selected directory in split mode when selecting a file --- editor/filesystem_dock.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index eb3ae330659..6ebc08efe45 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -124,6 +124,11 @@ bool FileSystemDock::_create_tree(TreeItem *p_parent, EditorFileSystemDirectory udata.push_back(file_item); EditorResourcePreview::get_singleton()->queue_resource_preview(file_metadata, this, "_tree_thumbnail_done", udata); } + } else if (display_mode == DISPLAY_MODE_SPLIT) { + if (lpath.get_base_dir() == path.get_base_dir()) { + subdirectory_item->select(0); + subdirectory_item->set_as_cursor(0); + } } if (searched_string.length() > 0) {