Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

Fix selected folder erroneously unfolding in the FileSystem dock

Michael Alexsandercada31133671
diff --git a/editor/docks/filesystem_dock.cpp b/editor/docks/filesystem_dock.cpp
index 3d0e4a970b0..d86b208e228 100644
--- a/editor/docks/filesystem_dock.cpp
+++ b/editor/docks/filesystem_dock.cpp
@@ -817,8 +817,8 @@ void FileSystemDock::_navigate_to_path(const String &p_path, bool p_select_in_fa
return;
}
- // Unfold all folders along the path.
- TreeItem *ti = *directory_ptr;
+ // Unfold all folders along the path (minus itself).
+ TreeItem *ti = (*directory_ptr)->get_parent();
while (ti) {
ti->set_collapsed(false);
ti = ti->get_parent();