André, I have just committed a locaDispatch method for InsetCommand-type 
insets (ie outside of mathed). I therefore have localDispatch methods for 
reference insets both inside and outside of mathed.

However, I have a subtle little problem. If I press on a RefInset within 
mathed to pop up the dialog and then move the cursor outside mathed then I 
get no visual feedback when I press 'Apply'. The RefInset's localDispatch 
is called correctly, but I must also call BufferView::updateInset, passing 
it the 'parent' InsetFormulaBase. How do I get hold of this info, given 
that the cursor is now outside mathed?

dispatch_result RefInset::localDispatch(FuncRequest const & cmd)
{
        MathArray ar;
        if (!string2RefInset(cmd.argument, ar))
                return UNDISPATCHED;

        *this = *ar[0].nucleus()->asRefInset();
        if (cmd.view())
                // This does not compile because updateInset expects
                // an Inset* and 'this' isn't.
                cmd.view()->updateInset(this, true);
        return DISPATCHED;
}

-- 
Angus

Reply via email to