]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_mboxinset.C
Andreas' patch to prevent crash on click on previewd inset
[lyx.git] / src / mathed / math_mboxinset.C
index 43ddc1823b3dddca3d4c1b9f632e6c4ec256b6f2..bd3c93b54c21554986b5b7ef089e282034cc6282 100644 (file)
@@ -56,7 +56,7 @@ void MathMBoxInset::metrics(MetricsInfo & mi, Dimension & dim) const
 
 void MathMBoxInset::draw(PainterInfo & pi, int x, int y) const
 {
-       text_.draw(pi, x + 1, y - text_.ascent());
+       text_.draw(pi, x + 1, y);
        drawMarkers(pi, x, y);
 }
 
@@ -90,7 +90,7 @@ int MathMBoxInset::latex(Buffer const & buf, std::ostream & os,
 }
 
 
-void MathMBoxInset::priv_dispatch(LCursor & cur, FuncRequest & cmd)
+void MathMBoxInset::doDispatch(LCursor & cur, FuncRequest & cmd)
 {
        text_.dispatch(cur, cmd);
 }
@@ -102,8 +102,16 @@ LyXText * MathMBoxInset::getText(int) const
 }
 
 
-void MathMBoxInset::getCursorPos(LCursor const & cur, int & x, int & y) const
+void MathMBoxInset::cursorPos
+       (CursorSlice const & sl, bool boundary, int & x, int & y) const
 {
-       x = text_.cursorX(cur.top());
-       y = text_.cursorY(cur.top());
+       x = text_.cursorX(sl, boundary);
+       y = text_.cursorY(sl, boundary);
 }
+
+
+void MathMBoxInset::drawSelection(PainterInfo & pi, int x, int y) const
+{
+       text_.drawSelection(pi, x, y);
+}
+