mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-09-20 15:01:58 +00:00
Fix bug 3407: Undo with text-in-mathmode
http://bugzilla.lyx.org/show_bug.cgi?id=3407 * InsetMathNest.cpp (doDispatch/LFUN_MATH_MODE): handle undo git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26173 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
416df64b5b
commit
97e6476feb
@ -929,6 +929,7 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd)
|
||||
// ignore math-mode on when already in math mode
|
||||
if (currentMode() == Inset::MATH_MODE && cmd.argument() == "on")
|
||||
break;
|
||||
cur.recordUndoSelection();
|
||||
cur.macroModeClose();
|
||||
docstring const save_selection = grabAndEraseSelection(cur);
|
||||
selClearOrDel(cur);
|
||||
@ -939,6 +940,7 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd)
|
||||
cur.niceInsert(save_selection);
|
||||
#else
|
||||
if (currentMode() == Inset::TEXT_MODE) {
|
||||
cur.recordUndoSelection();
|
||||
cur.niceInsert(MathAtom(new InsetMathHull("simple")));
|
||||
cur.message(_("create new math text environment ($...$)"));
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user