Bo Peng wrote:
The way to solve this might be to put some appropriate code into
InsetCaption::notifyCursorLeaves().

I do not think it is a good idea to update Toc during editing, because
simple add/remove of sections, change of environment will break Toc,
so it is close to impossible to consider all cases and update Toc.

Because TocBackend::update() is expansive, I even think we should
remove all such calls triggered by, e.g., changing the environment of
a paragraph to section.

Please don't touch at that. When you change a section depth, the full renumbering is done (in updateLabels()). It is only natural to update also the TocBackend at the same time. Actually this update is much quicker than the section renumbering.

Abdel.

Reply via email to