1
Fork 0
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:
Andreas Kling 2019-03-30 02:22:38 +01:00
parent be42382a3a
commit f10e0d0546
3 changed files with 16 additions and 1 deletions

View file

@ -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)