mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:18:11 +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
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…
Add table
Add a link
Reference in a new issue