X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2Fmath_nestinset.C;h=79d058907e3ce0f105bca9010f9d95b3ddebe3d4;hb=183239b7def8ca0e51432f2d88891d4b9f055953;hp=5eaad59db7e44fd4ff96cd9a615724826aa1914f;hpb=e978fa42e38be22e9312be963ba6512fcd4b45ef;p=lyx.git diff --git a/src/mathed/math_nestinset.C b/src/mathed/math_nestinset.C index 5eaad59db7..79d058907e 100644 --- a/src/mathed/math_nestinset.C +++ b/src/mathed/math_nestinset.C @@ -380,7 +380,7 @@ void MathNestInset::handleFont2(LCursor & cur, string const & arg) } -void MathNestInset::priv_dispatch(LCursor & cur, FuncRequest & cmd) +void MathNestInset::doDispatch(LCursor & cur, FuncRequest & cmd) { //lyxerr << "MathNestInset: request: " << cmd << std::endl; //CursorSlice sl = cur.current(); @@ -684,6 +684,9 @@ void MathNestInset::priv_dispatch(LCursor & cur, FuncRequest & cmd) case LFUN_MATH_MODE: #if 1 + // ignore math-mode on when already in math mode + if (currentMode() == InsetBase::MATH_MODE && cmd.argument == "on") + break; cur.macroModeClose(); selClearOrDel(cur); cur.plainInsert(MathAtom(new MathMBoxInset(cur.bv()))); @@ -791,7 +794,7 @@ void MathNestInset::priv_dispatch(LCursor & cur, FuncRequest & cmd) } default: - MathDimInset::priv_dispatch(cur, cmd); + MathDimInset::doDispatch(cur, cmd); break; } }