]> git.lyx.org Git - lyx.git/commitdiff
bugfix (invalid cursor position)
authorAndré Pönitz <poenitz@gmx.net>
Thu, 12 Jul 2001 11:53:45 +0000 (11:53 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Thu, 12 Jul 2001 11:53:45 +0000 (11:53 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2222 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/formula.C

index b6d8e4613a0a46e548c52e53efd2b659d714004e..b3a648990301f0de03235280a3ce2f0ac943e6e8 100644 (file)
@@ -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);