bugfix (invalid cursor position)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2222 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2001-07-12 11:53:45 +00:00
parent 6396f9a204
commit 4dd6a8932e

View File

@ -262,14 +262,21 @@ InsetFormula::localDispatch(BufferView * bv, kb_action action,
} }
case LFUN_MATH_DISPLAY: case LFUN_MATH_DISPLAY:
{
int x;
int y;
mathcursor->GetPos(x, y);
if (par()->GetType() == LM_OT_SIMPLE) { if (par()->GetType() == LM_OT_SIMPLE) {
par()->mutate(LM_OT_EQUATION); par()->mutate(LM_OT_EQUATION);
par()->numbered(0, false); par()->numbered(0, false);
} }
else else
par()->mutate(LM_OT_SIMPLE); par()->mutate(LM_OT_SIMPLE);
mathcursor->SetPos(x, y);
mathcursor->normalize();
updateLocal(bv); updateLocal(bv);
break; break;
}
default: default:
result = InsetFormulaBase::localDispatch(bv, action, arg); result = InsetFormulaBase::localDispatch(bv, action, arg);