]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/screen.C
fix math fonts with LyX/Mac
[lyx.git] / src / frontends / screen.C
index 7b06eabb3fffdbf7acc40bc7d5544a7fae1f6251..79ac58e5ae6153d43421d4ea10d0b342ae94aaf9 100644 (file)
@@ -172,7 +172,7 @@ void LyXScreen::showCursor(BufferView & bv)
        int h = ascent + descent;
        int x = 0;
        int y = 0;
-       bv.fullCursor().getPos(x, y);
+       bv.cursor().getPos(x, y);
        y -= ascent + bv.top_y();
        //lyxerr << "LyXScreen::showCursor x: " << x << " y: " << y << endl;
 
@@ -211,9 +211,13 @@ bool LyXScreen::fitCursor(BufferView * bv)
        int newtop = top_y;
        int x, y, asc, desc;
 
-       bv->fullCursor().getPos(x, y);
-       bv->fullCursor().getDim(asc, desc);
-       
+       bv->cursor().getPos(x, y);
+       bv->cursor().getDim(asc, desc);
+       lyxerr[Debug::DEBUG] << "LyXScreen::fitCursor: x: " << x
+                            << " y: " << y
+                            << "  top_y: " << top_y
+                            << endl;
+
        bool const big_row = h / 4 < asc + desc && asc + desc < h;
 
        if (y + desc - top_y >= h) {
@@ -257,17 +261,19 @@ void LyXScreen::redraw(BufferView & bv)
 
        // maybe we have to clear the screen at the bottom
        int const y2 = workarea().workHeight();
-       if (y < y2 && !bv.text()->isInInset()) {
+       if (y < y2 && bv.text()->isMainText()) {
                workarea().getPainter().fillRectangle(0, y,
                        workarea().workWidth(), y2 - y,
                        LColor::bottomarea);
        }
 
-       lyxerr << "Redraw screen" << endl;
+       lyxerr[Debug::DEBUG] << "Redraw screen" << endl;
 
        expose(0, 0, workarea().workWidth(), workarea().workHeight());
 
        workarea().getPainter().end();
+
+       showCursor(bv);
 }