mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 09:30:24 +00:00
FileManager: Only set ~/Desktop as model root path in desktop mode
Setting it as model root path in DirectoryView::setup_model() for windowed mode as well would cause an issue with the following: - "open ~/Desktop" - "FileManager ~/Desktop" - "Show in FileManager..." from Desktop context menu When viewing the Desktop as the initial path it would be the same and on_path_change wasn't called, leading to various widgets and window properties not being updated. Fixes #3772.
This commit is contained in:
parent
ac98a48177
commit
20907780bd
Notes:
sideshowbarker
2024-07-19 01:53:43 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/20907780bd9 Pull-request: https://github.com/SerenityOS/serenity/pull/3777 Issue: https://github.com/SerenityOS/serenity/issues/3772
1 changed files with 2 additions and 1 deletions
|
@ -158,7 +158,8 @@ const GUI::FileSystemModel::Node& DirectoryView::node(const GUI::ModelIndex& ind
|
|||
|
||||
void DirectoryView::setup_model()
|
||||
{
|
||||
m_model->set_root_path(Core::StandardPaths::desktop_directory());
|
||||
if (is_desktop())
|
||||
m_model->set_root_path(Core::StandardPaths::desktop_directory());
|
||||
|
||||
m_model->on_error = [this](int, const char* error_string) {
|
||||
auto failed_path = m_model->root_path();
|
||||
|
|
Loading…
Reference in a new issue