1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:17:35 +00:00

LibGUI+CertificateSettings: Use custom SortingProxy

The default SortingProxyModel does not allow to react to reodering.
As we would like to keep the column width on sorting, we create a
subclass and inject our code into the sorting method.
This commit is contained in:
Fabian Dellwing 2023-04-02 17:50:03 +02:00 committed by Andrew Kaster
parent dfce65a0ab
commit 14d78e10d1
3 changed files with 38 additions and 5 deletions

View file

@ -48,9 +48,10 @@ public:
virtual void sort(int column, SortOrder) override;
private:
protected:
explicit SortingProxyModel(NonnullRefPtr<Model> source);
private:
// NOTE: The internal_data() of indices points to the corresponding Mapping object for that index.
struct Mapping {
Vector<int> source_rows;