mirror of
https://github.com/RGBCube/serenity
synced 2025-05-17 21:15:06 +00:00
FileManager: Make the directory view follow the tree view selection.
This commit is contained in:
parent
be42382a3a
commit
f10e0d0546
3 changed files with 16 additions and 1 deletions
|
@ -92,6 +92,15 @@ struct GFileSystemModel::Node {
|
|||
}
|
||||
};
|
||||
|
||||
String GFileSystemModel::path(const GModelIndex& index) const
|
||||
{
|
||||
if (!index.is_valid())
|
||||
return { };
|
||||
auto& node = *(Node*)index.internal_data();
|
||||
node.reify_if_needed(*this);
|
||||
return node.full_path(*this);
|
||||
}
|
||||
|
||||
GFileSystemModel::GFileSystemModel(const String& root_path, Mode mode)
|
||||
: m_root_path(FileSystemPath(root_path).string())
|
||||
, m_mode(mode)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue