From 4dd6a8932e03a0f32aee1b101c610378bdeb7661 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Thu, 12 Jul 2001 11:53:45 +0000 Subject: [PATCH] bugfix (invalid cursor position) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2222 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/formula.C | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/mathed/formula.C b/src/mathed/formula.C index b6d8e4613a..b3a6489903 100644 --- a/src/mathed/formula.C +++ b/src/mathed/formula.C @@ -262,14 +262,21 @@ InsetFormula::localDispatch(BufferView * bv, kb_action action, } case LFUN_MATH_DISPLAY: + { + int x; + int y; + mathcursor->GetPos(x, y); if (par()->GetType() == LM_OT_SIMPLE) { par()->mutate(LM_OT_EQUATION); par()->numbered(0, false); } else par()->mutate(LM_OT_SIMPLE); + mathcursor->SetPos(x, y); + mathcursor->normalize(); updateLocal(bv); break; + } default: result = InsetFormulaBase::localDispatch(bv, action, arg);