From 6fb07e35c51242c52fe5f961408ba82a1dff82b6 Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Thu, 8 Oct 2009 12:32:11 +0000 Subject: [PATCH] Fix bug #6264: Broken undo of removed script in mathed when both scripts are present. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31558 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/InsetMathScript.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mathed/InsetMathScript.cpp b/src/mathed/InsetMathScript.cpp index 8a6c258080..b445de9473 100644 --- a/src/mathed/InsetMathScript.cpp +++ b/src/mathed/InsetMathScript.cpp @@ -675,11 +675,13 @@ bool InsetMathScript::notifyCursorLeaves(Cursor const & old, Cursor & cur) if (nargs() > 2 && (!cell(1).empty() || !cell(2).empty())) { if (cell(2).empty()) { // must be a subscript... + old.recordUndoInset(); removeScript(false); cur.updateFlags(cur.disp_.update() | Update::SinglePar); return true; } else if (cell(1).empty()) { // must be a superscript... + old.recordUndoInset(); removeScript(true); cur.updateFlags(cur.disp_.update() | Update::SinglePar); return true; -- 2.39.2