* 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
This commit is contained in:
Martin Vermeer 2006-03-20 08:42:43 +00:00
parent 2c30e9b17a
commit 0a57bcafeb

View File

@ -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")));