treelistmodel: Cache the item
authorBenjamin Otte <otte@redhat.com>
Sun, 19 Mar 2023 04:04:51 +0000 (05:04 +0100)
committerBenjamin Otte <otte@redhat.com>
Sun, 19 Mar 2023 05:55:05 +0000 (06:55 +0100)
commit9048e391b60e19ccefa0b9fe51c466d16b42dcc4
treea2102a4261fb64f298a33552ba5f90a6f81c5766
parentf4be5c80c6ce5adc6672484b0c8c43e8009b42d6
treelistmodel: Cache the item

This is a good idea to avoid reentrancy problems when any child model
(or potentially more than one child model) has started emitting
items-changed but the emission hasn't arrived in this model yet.

At tat point, we'd get_item() the wrong item from those models.

We want to avoid such cases of reentrancy.

Related: #5646
gtk/gtktreelistmodel.c