mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-28 12:18:25 +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:
@@ -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() };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user