From 0a57bcafeb3417d84e232c814203dc1fdf500c40 Mon Sep 17 00:00:00 2001 From: Martin Vermeer Date: Mon, 20 Mar 2006 08:42:43 +0000 Subject: [PATCH] * math_nestinset.C (MathNestInset::doDispatch): fix bug 2345: C-M on text in math gives an empty mbox git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13425 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/math_nestinset.C | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mathed/math_nestinset.C b/src/mathed/math_nestinset.C index 3d54c3f35b..f232a6ecec 100644 --- a/src/mathed/math_nestinset.C +++ b/src/mathed/math_nestinset.C @@ -798,11 +798,13 @@ void MathNestInset::doDispatch(LCursor & cur, FuncRequest & cmd) if (currentMode() == InsetBase::MATH_MODE && cmd.argument == "on") break; cur.macroModeClose(); + safe_ = grabAndEraseSelection(cur); selClearOrDel(cur); //cur.plainInsert(MathAtom(new MathMBoxInset(cur.bv()))); cur.plainInsert(MathAtom(new MathBoxInset("mbox"))); cur.posLeft(); cur.pushLeft(*cur.nextInset()); + cur.niceInsert(safe_); #else if (currentMode() == InsetBase::TEXT_MODE) { cur.niceInsert(MathAtom(new MathHullInset("simple"))); -- 2.39.5