models: emit a notification with model contents
commit2e13b35a64870348221b8890e9f9196006fb5a46
authorDavid Aguilar <davvid@gmail.com>
Sun, 11 Jul 2021 20:10:24 +0000 (11 13:10 -0700)
committerDavid Aguilar <davvid@gmail.com>
Sun, 11 Jul 2021 22:25:09 +0000 (11 15:25 -0700)
tree6bf58c6d582d4a717c2c78cd4ced4a37e4c571aa
parentbef74ed23d2da2d29cbaf94739e178d3cbc6adaf
models: emit a notification with model contents

The deferred nature of Qt notifications causes the about_to_update
signal to get handled *after* the model contents have been updated.

This makes it difficult to implement the selection restoration behavior
in the Status widget because we need access to the original state.

Emit a notification with the original state so that we can store and use
it in the Status widget.

Related-to: #1130 #1131
Signed-off-by: David Aguilar <davvid@gmail.com>
cola/models/main.py
cola/widgets/status.py