]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathSqrt.cpp
fix off-by-two drawing error
[lyx.git] / src / mathed / InsetMathSqrt.cpp
index 23ded20156eb97e9c6d9dea34901d8e8f860a21c..ab63ac1e447ec4f984464c063bf45caf1e9c7d74 100644 (file)
@@ -37,8 +37,6 @@ void InsetMathSqrt::metrics(MetricsInfo & mi, Dimension & dim) const
        dim.des += 2;
        dim.wid += 12;
        metricsMarkers(dim);
-       // Cache the inset dimension. 
-       setDimCache(mi, dim);
 }
 
 
@@ -82,6 +80,7 @@ void InsetMathSqrt::drawT(TextPainter & /*pain*/, int /*x*/, int /*y*/) const
 
 void InsetMathSqrt::write(WriteStream & os) const
 {
+       MathEnsurer ensurer(os);
        os << "\\sqrt{" << cell(0) << '}';
 }