Merge pull request #33032 from Calinou/filedialog-scroll-to-top
Scroll back to the top after opening a directory in FileDialog
This commit is contained in:
commit
9e572b5bac
2 changed files with 7 additions and 0 deletions
|
@ -703,6 +703,9 @@ void EditorFileDialog::update_file_list() {
|
|||
|
||||
item_list->clear();
|
||||
|
||||
// Scroll back to the top after opening a directory
|
||||
item_list->get_v_scroll()->set_value(0);
|
||||
|
||||
if (display_mode == DISPLAY_THUMBNAILS) {
|
||||
|
||||
item_list->set_max_columns(0);
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue