mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 10:48:41 +00:00
LibGUI: Resort SortingProxyModel when source invalidates if possible
If the source model invalidates with indexes still good, we can simply resort the proxy's mappings.
This commit is contained in:
@@ -44,7 +44,10 @@ SortingProxyModel::~SortingProxyModel()
|
||||
|
||||
void SortingProxyModel::invalidate(unsigned int flags)
|
||||
{
|
||||
m_mappings.clear();
|
||||
if (flags == UpdateFlag::DontInvalidateIndexes)
|
||||
sort(m_last_key_column, m_last_sort_order);
|
||||
else
|
||||
m_mappings.clear();
|
||||
did_update(flags);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user