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.
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.
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.