This is wrong. updateLabels() IS called from LFUN_CAPTION_INSERT. But it
is NOT called after the caption itself is edited. So you get the same
problem if you change an existing caption and then view the navigation
menu or, for that matter, the TOC.

The way to solve this might be to put some appropriate code into
InsetCaption::notifyCursorLeaves(). I tried this but don't have anything
that works. (Mostly, I cause crashes.) In fact, however, this won't
quite work anyway, because notifyCursorLeaves() doesn't seem to be
called if the cursor leaves the inset via keyboard navigation, though it
is called if you move the cursor out with the mouse. That seems wrong,
i.e., it seems like a bug.

update toc and list of xxx seems to me an expensive operation. Can it
be done on demand? I mean, maybe we can add a 'refresh'/'regenerate'
button in the outline panel; and update 'list of listings' and such
only if this menu item is clicked.

Bo

Reply via email to