You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-12 13:20:55 +00:00
Scroll back to the top after opening a directory in FileDialog
This also changes the behavior in EditorFileDialog. This closes #26041.
This commit is contained in:
@@ -413,6 +413,10 @@ void FileDialog::update_file_name() {
|
||||
void FileDialog::update_file_list() {
|
||||
|
||||
tree->clear();
|
||||
|
||||
// Scroll back to the top after opening a directory
|
||||
tree->get_vscroll_bar()->set_value(0);
|
||||
|
||||
dir_access->list_dir_begin();
|
||||
|
||||
TreeItem *root = tree->create_item();
|
||||
|
||||
Reference in New Issue
Block a user