summaryrefslogtreecommitdiffstats
path: root/editor/filesystem_dock.cpp
diff options
context:
space:
mode:
authorYuri Sizov <yuris@humnom.net>2023-12-14 17:38:30 +0100
committerYuri Sizov <yuris@humnom.net>2023-12-14 17:38:30 +0100
commit8f33b4e83a81a18d6a2d58b46bb2b4388c429aaa (patch)
tree7d90b7a8e8cbbaed7976acd892e1c931d18757bc /editor/filesystem_dock.cpp
parent6faa5c6dc479bebd4b92a5251fafe22b21ca9523 (diff)
parent59787683a91c25d28e69b67ae9a56eac6f6d83bd (diff)
downloadredot-engine-8f33b4e83a81a18d6a2d58b46bb2b4388c429aaa.tar.gz
Merge pull request #84882 from Invertex/select-instance-asset
Add "Show In FileSystem" to the Scene hierarchy right-click
Diffstat (limited to 'editor/filesystem_dock.cpp')
-rw-r--r--editor/filesystem_dock.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index b02af17657..224f4c2041 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -756,6 +756,14 @@ void FileSystemDock::_navigate_to_path(const String &p_path, bool p_select_in_fa
void FileSystemDock::navigate_to_path(const String &p_path) {
file_list_search_box->clear();
_navigate_to_path(p_path);
+
+ // Ensure that the FileSystem dock is visible.
+ if (get_window() == get_tree()->get_root()) {
+ TabContainer *tab_container = (TabContainer *)get_parent_control();
+ tab_container->set_current_tab(tab_container->get_tab_idx_from_control((Control *)this));
+ } else {
+ get_window()->grab_focus();
+ }
}
void FileSystemDock::_file_list_thumbnail_done(const String &p_path, const Ref<Texture2D> &p_preview, const Ref<Texture2D> &p_small_preview, const Variant &p_udata) {