mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 20:59:16 +00:00
LibGUI: Make SortingProxyModel clear view selections aggressively
When invalidating all indexes, tell all attached views to just wipe their selections. This is the best we can do for now.
This commit is contained in:
parent
9102b624ac
commit
a66e55ec64
Notes:
sideshowbarker
2024-07-19 03:32:59 +09:00
Author: https://github.com/awesomekling
Commit: a66e55ec64
1 changed files with 8 additions and 2 deletions
|
@ -44,10 +44,16 @@ SortingProxyModel::~SortingProxyModel()
|
|||
|
||||
void SortingProxyModel::invalidate(unsigned int flags)
|
||||
{
|
||||
if (flags == UpdateFlag::DontInvalidateIndexes)
|
||||
if (flags == UpdateFlag::DontInvalidateIndexes) {
|
||||
sort(m_last_key_column, m_last_sort_order);
|
||||
else
|
||||
} else {
|
||||
m_mappings.clear();
|
||||
|
||||
// FIXME: This is really harsh, but without precise invalidation, not much we can do.
|
||||
for_each_view([&](auto& view) {
|
||||
view.selection().clear();
|
||||
});
|
||||
}
|
||||
did_update(flags);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue