1
0
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:
Hugo Locurcio
2019-10-24 15:31:31 +02:00
parent 79dae3a87e
commit c3b9319d78
2 changed files with 7 additions and 0 deletions

View File

@@ -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();