From: Jean-Marc Lasgouttes Date: Fri, 29 Dec 2006 11:07:23 +0000 (+0000) Subject: * InsetMathNest.C (handleFont): avoid crash on undo when X-Git-Tag: 1.6.10~11424 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=ca6838b288daf07eec7d7a381d74c639c0de3a46;p=features.git * InsetMathNest.C (handleFont): avoid crash on undo when suppressing a font inset (bug 3019). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16424 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/mathed/InsetMathNest.C b/src/mathed/InsetMathNest.C index b9b29db0ec..367b4a65b7 100644 --- a/src/mathed/InsetMathNest.C +++ b/src/mathed/InsetMathNest.C @@ -401,11 +401,12 @@ void InsetMathNest::handleFont { // this whole function is a hack and won't work for incremental font // changes... - recordUndo(cur, Undo::ATOMIC); - if (cur.inset().asInsetMath()->name() == font) + if (cur.inset().asInsetMath()->name() == font) { + recordUndoInset(cur, Undo::ATOMIC); cur.handleFont(to_utf8(font)); - else { + } else { + recordUndo(cur, Undo::ATOMIC); cur.handleNest(createInsetMath(font)); cur.insert(arg); }