SerenityOS / serenity

The Serenity Operating System 🐞
https://serenityos.org
BSD 2-Clause "Simplified" License
30.45k stars 3.18k forks source link

LibGUI: Model and view classes should support detailed index invalidation #4793

Open awesomekling opened 3 years ago

awesomekling commented 3 years ago

To support persistent indexes (useful for cursors and selection) and generally just not invalidating views whenever the data changes, we should support detailed index invalidation in our model/view classes.

Since the LibGUI classes are heavily inspired by Qt's classes, a good starting point would be here: https://doc.qt.io/qt-5/qabstractitemmodel.html

Basically, we want the model to notify all attached views when indexes are being inserted/removed/moved and teach our views to react accordingly. Once this works, we no longer need to invalidate indexes after any model update.

ADKaster commented 8 months ago

Related work:

7687

9269