]> git.lyx.org Git - lyx.git/commitdiff
fix "cursor moving out of visible area" in large formulas
authorAndré Pönitz <poenitz@gmx.net>
Thu, 13 Dec 2001 14:12:09 +0000 (14:12 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Thu, 13 Dec 2001 14:12:09 +0000 (14:12 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3203 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/formulabase.C

index 05ad274999e9ce242f7f14a03510dbc4ec06a76d..5561a0450716e215da05eb6ff52821a2601b2f1d 100644 (file)
@@ -209,16 +209,17 @@ void InsetFormulaBase::showInsetCursor(BufferView * bv, bool)
        if (isCursorVisible())
                return;
        if (mathcursor) {
+               metrics(bv);
                int x;
                int y;
                mathcursor->getPos(x, y);
+               y -= yo_;
                int asc = 0;
                int des = 0;
                MathMetricsInfo mi(bv, font_, display() ? LM_ST_DISPLAY : LM_ST_TEXT);
                math_font_max_dim(LM_TC_TEXTRM, mi, asc, des);
-               //bv->fitLockedInsetCursor(x, y, asc, des);
-               //metrics(bv);
-               //lyxerr << "showInsetCursor: " << x << " " << y << "\n";
+               bv->fitLockedInsetCursor(x, y, asc, des);
+               //lyxerr << "showInsetCursor: x: " << x << " y: " << y << "\n";
        }
        toggleInsetCursor(bv);
 }