On 04/23/2011 11:45 AM, Edwin Leuven wrote:

I wonder if we could try:
    ParagraphList::const_iterator pit =
tail.getText(0)->paragraphs().begin();
    buffer().updateBuffer(pit, OutputUpdate);
i am not sure i completely follow you, but when i use

buffer().updateBuffer(par_iterator_begin(tail), OutputUpdate);

instead of the code above, the crashes are gone (also with nested insets)

That was the idea.

but now i get the asserts below

Can you post this version of the patch and I'll try to have a look? I'm wondering where these comparisons are being made and whether we need to do something to the cursor. But I'm really just guessing here.

I guess the other idea would be to recurse through all the insets. Something like (pseudocode):

    InsetText::setMacroContextRecursive()
    {
        text_->setMacrocontextPosition(...); // what goes here?
        foreach inset in text_ {
            if (inset.asInsetText())
                inset.asInsetText()->setMacroContextRecursive();
        }
    }

and then call this from InsetTabular.

Frankly, I'm guessing at this point, and I never seem to know where to get the DocIterator I need. Hence the "..." above.

Richard

Reply via email to