mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-03 17:58:49 +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:
parent
6715b696fa
commit
17992fbab7
Notes:
sideshowbarker
2024-07-19 03:33:23 +09:00
Author: https://github.com/awesomekling
Commit: 17992fbab7
1 changed files with 4 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue