diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-09-08 09:07:47 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-09-08 09:08:50 +0200 |
commit | fb275c9442a3bde70a5419f0dac9147e23c5be23 (patch) | |
tree | 37d272a0397f78aa24fbb1f059dd4cc7739f0c2a /Applications | |
parent | 9273589c5eb0f24d6ee60b361666d0e7d9218607 (diff) | |
download | serenity-fb275c9442a3bde70a5419f0dac9147e23c5be23.zip |
FileManager: Make the tree view follow the path changes correctly
The left-side tree view was not following along when switching paths
via the right-side views. Hook this back up.
Diffstat (limited to 'Applications')
-rw-r--r-- | Applications/FileManager/main.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Applications/FileManager/main.cpp b/Applications/FileManager/main.cpp index a877dc28b2..4b5c551f47 100644 --- a/Applications/FileManager/main.cpp +++ b/Applications/FileManager/main.cpp @@ -198,10 +198,8 @@ int main(int argc, char** argv) window->set_title(String::format("File Manager: %s", new_path.characters())); location_textbox->set_text(new_path); auto new_index = file_system_model->index(new_path); - directory_view->for_each_view_implementation([&](auto& view) { - view.selection().set(new_index); - }); - tree_view->scroll_into_view(directory_view->current_view().selection().first(), Orientation::Vertical); + tree_view->selection().set(new_index); + tree_view->scroll_into_view(new_index, Orientation::Vertical); tree_view->update(); go_forward_action->set_enabled(directory_view->path_history_position() |