Helge Hafting wrote:
This has become a very nice tool!  Still, I see a problem:

1. Select some heading in the userguide.
2. Demote it so much that it is no longer numbered.
3. Note that it is now no longer electible for promotion, so
   no way to undo the effect manually.

It isn't supposed to be like that, is it?
I suggest that one shouldn't be allowed to demote down to a level
from which promotion isn't possible. Or alterntatively, allow
promotion of lower levels.

I agree. If so wants to look at this problem, I think the relevant portion od code is in TocBackend::update():


/// now the toc entry for the paragraph
int const toclevel = pit->layout()->toclevel;
if (toclevel != Layout::NOT_IN_TOC
    && toclevel >= min_toclevel
    && toclevel <= bufparams.tocdepth) {
        // insert this into the table of contents
        if (tocstring.empty())
                tocstring = pit->asString(*buffer_, true);
        toc.push_back(
                TocItem(pit, toclevel - min_toclevel, tocstring));
}


I guess we should not check for (toclevel <= bufparams.tocdepth).

Abdel.

Reply via email to