mirror of
https://github.com/RGBCube/serenity
synced 2025-05-19 02:35:06 +00:00
FileManager: Hook up a GSortingProxyTableModel so we get sorted files. :^)
The next step here is coming up with a nice way to always put directories ahead of files.
This commit is contained in:
parent
7d2c962836
commit
e14dd06b8c
4 changed files with 25 additions and 10 deletions
|
@ -28,14 +28,10 @@ int GSortingProxyTableModel::column_count() const
|
|||
GModelIndex GSortingProxyTableModel::map_to_target(const GModelIndex& index) const
|
||||
{
|
||||
ASSERT(!m_row_mappings.is_empty());
|
||||
if (!index.is_valid()) {
|
||||
ASSERT_NOT_REACHED();
|
||||
if (!index.is_valid())
|
||||
return { };
|
||||
}
|
||||
if (index.row() >= row_count() || index.column() >= column_count()) {
|
||||
ASSERT_NOT_REACHED();
|
||||
if (index.row() >= row_count() || index.column() >= column_count())
|
||||
return { };
|
||||
}
|
||||
return { m_row_mappings[index.row()], index.column() };
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue