Scroll to selected file on sorting change

This commit is contained in:
kobewi
2025-12-12 20:46:12 +01:00
parent e2a10cd46f
commit e2a1ed44ac
2 changed files with 6 additions and 0 deletions
+5
View File
@@ -1528,6 +1528,10 @@ void FileDialog::_invalidate() {
update_file_list();
if (ensure_visible_after_invalidating) {
file_list->ensure_current_is_visible();
ensure_visible_after_invalidating = false;
}
is_invalidating = false;
}
@@ -1621,6 +1625,7 @@ void FileDialog::_sort_option_selected(int p_option) {
file_sort_button->get_popup()->set_item_checked(i, (i == p_option));
}
file_sort = FileSortOption(p_option);
ensure_visible_after_invalidating = true;
invalidate();
}
+1
View File
@@ -205,6 +205,7 @@ private:
String full_dir;
bool is_invalidating = false;
bool ensure_visible_after_invalidating = false;
VBoxContainer *main_vbox = nullptr;