* formula.C (descent): add an arbitrary 12 pixels to the descent when
previewing a display mode equation, analogous to André's code elsewhere.
+ * math_nestinset.C (notifyCursorLeaves): generate the preview only
+ when leaving an inset with depth() == 1.
+
2002-07-22 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* math_support.C (mathed_draw_deco): fix rounding bug for rotated
void MathNestInset::notifyCursorLeaves()
{
- //lyxerr << "leaving " << *this << "\n";
- if (!mathcursor || !grfx::Previews::activated())
+ // Generate a preview only if previews are active and we are leaving
+ // the InsetFormula itself
+ if (!grfx::Previews::activated() ||
+ !mathcursor || mathcursor->depth() != 1)
return;
InsetFormulaBase * inset = mathcursor->formula();
BufferView * bufferview = inset->view();
+
+ // Paranoia check
if (!bufferview || !bufferview->buffer())
return;