]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_fracinset.C
Andreas' patch to prevent crash on click on previewd inset
[lyx.git] / src / mathed / math_fracinset.C
index a326c41994d1d666a1a1ce24359fd26167a1d547..829ddf5134d26a178fbf029a431059fbd61e16b3 100644 (file)
@@ -29,7 +29,7 @@ MathFracInset::MathFracInset(bool atop)
 {}
 
 
-auto_ptr<InsetBase> MathFracInset::clone() const
+auto_ptr<InsetBase> MathFracInset::doClone() const
 {
        return auto_ptr<InsetBase>(new MathFracInset(*this));
 }
@@ -52,10 +52,11 @@ void MathFracInset::metrics(MetricsInfo & mi, Dimension & dim) const
        FracChanger dummy(mi.base);
        cell(0).metrics(mi);
        cell(1).metrics(mi);
-       dim_.wid = max(cell(0).width(), cell(1).width()) + 2;
-       dim_.asc = cell(0).height() + 2 + 5;
-       dim_.des = cell(1).height() + 2 - 5;
-       dim = dim_;
+       dim.wid = max(cell(0).width(), cell(1).width()) + 2;
+       dim.asc = cell(0).height() + 2 + 5;
+       dim.des = cell(1).height() + 2 - 5;
+       metricsMarkers(dim);
+       dim_ = dim;
 }
 
 
@@ -68,6 +69,7 @@ void MathFracInset::draw(PainterInfo & pi, int x, int y) const
        cell(1).draw(pi, m - cell(1).width() / 2, y + cell(1).ascent()  + 2 - 5);
        if (!atop_)
                pi.pain.line(x + 1, y - 5, x + dim_.wid - 2, y - 5, LColor::math);
+       drawMarkers(pi, x, y);
 }