mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:28:10 +00:00
FileManager: Properly reveal newly opened directories in the treeview
Use the new TreeView::expand_all_parent_of() API to ensure that newly opened directories are revealed and scrolled-into-view in the left-side treeview. :^)
This commit is contained in:
parent
3bccd99fe9
commit
eb24603da0
1 changed files with 2 additions and 3 deletions
|
@ -523,9 +523,8 @@ int run_in_windowed_mode(RefPtr<Core::ConfigFile> config, String initial_locatio
|
|||
location_textbox.set_text(new_path);
|
||||
auto new_index = directories_model->index(new_path, GUI::FileSystemModel::Column::Name);
|
||||
if (new_index.is_valid()) {
|
||||
tree_view.selection().set(new_index);
|
||||
tree_view.scroll_into_view(new_index, false, true);
|
||||
tree_view.update();
|
||||
tree_view.expand_all_parents_of(new_index);
|
||||
tree_view.set_cursor(new_index, GUI::AbstractView::SelectionUpdate::Set);
|
||||
}
|
||||
|
||||
struct stat st;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue