On Friday 02 August 2002 12:11 pm, Angus Leeming wrote:
> >�I was asking whether there is some function in th LyX insets that gets
> >�calleds when ever the LyX inset is losing focus (i.e. some equivalent to
> >�math inset's 'notifyCursorLeave'). In �this case we could just destroy
> > the math cursor there.
>
> I don't think so, but we can use notifyCursorLeaves().
I looked more closely. This is what you and I are both looking for.
void InsetFormulaBase::insetUnlock(BufferView * bv)
{
if (mathcursor) {
if (mathcursor->inMacroMode()) {
mathcursor->macroModeClose();
updateLocal(bv, true);
}
releaseMathCursor(bv);
}
+ generatePreview();
bv->updateInset(this, false);
}
Means I can empty out notifyCursorLeaves() entirely.
Angus