]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_makeboxinset.C
Fix to bug 2362: Deleting superscript also deletes subscript.
[lyx.git] / src / mathed / math_makeboxinset.C
index cf3325b329be3920507d5dcc0101eefc85c27f60..a3d6d4b480b07b0a1875c6ff541c3089b38063b2 100644 (file)
@@ -25,7 +25,7 @@ MathMakeboxInset::MathMakeboxInset()
 {}
 
 
-auto_ptr<InsetBase> MathMakeboxInset::clone() const
+auto_ptr<InsetBase> MathMakeboxInset::doClone() const
 {
        return auto_ptr<InsetBase>(new MathMakeboxInset(*this));
 }
@@ -36,12 +36,12 @@ void MathMakeboxInset::metrics(MetricsInfo & mi, Dimension & dim) const
        FontSetChanger dummy(mi.base, "textnormal");
        w_ = mathed_char_width(mi.base.font, '[');
        MathNestInset::metrics(mi);
-       dim_   = cell(0).dim();
-       dim_  += cell(1).dim();
-       dim_  += cell(2).dim();
-       dim_.wid += 4 * w_ + 4;
-       metricsMarkers();
-       dim = dim_;
+       dim   = cell(0).dim();
+       dim  += cell(1).dim();
+       dim  += cell(2).dim();
+       dim.wid += 4 * w_ + 4;
+       metricsMarkers(dim);
+       dim_ = dim;
 }
 
 
@@ -65,6 +65,7 @@ void MathMakeboxInset::draw(PainterInfo & pi, int x, int y) const
        x += w_ + 2;
 
        cell(2).draw(pi, x, y);
+       setPosCache(pi, x, y);
 }