On 11/29/25 10:20 AM, Jean-Marc Lasgouttes wrote:
The other question is: why does one more call to updateBuffer create such a problem? Many other actions trigger it.
Yes, though when I redid all that code, I tried very hard not to have it be called in this way, but only when the dispatch is done.
Is there a way we could remove the deleted label from the reference cache, without having to go through the whole updateBuffer process? That was Georg's idea, and it's the right idea. But it's not clear how to make that happen. My first thought is to trigger the removal from the InsetLabel destructor. But that might trigger too often (e.g., destruction of copied labels). Another would be to introduce some separate procedure that *only* rebuilds the reference cache that could be called from here. But that would involve a lot of code duplication, possibly. And it would probably also call the expensive forwardInset.
Maybe a third idea would be brute force: look through what we are deleting and see if there are any labels in there. If so, remove them from the cache.
Riki
-- lyx-devel mailing list [email protected] https://lists.lyx.org/mailman/listinfo/lyx-devel
