]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_macroarg.C
Fix reading of math macros
[lyx.git] / src / mathed / math_macroarg.C
index 0430a41d3d077481c1316b37a6415d5fd272efd2..b73426d3798ad7b5f6db898e0a9b6c8142a7e22c 100644 (file)
@@ -39,21 +39,17 @@ void MathMacroArgument::write(WriteStream & os) const
 
 void MathMacroArgument::metrics(MathMetricsInfo & mi) const
 {
-       if (expanded_) {
-               xcell(0).metrics(mi);
-               width_   = xcell(0).width();
-               ascent_  = xcell(0).ascent();
-               descent_ = xcell(0).descent();
-       } else {
-               mathed_string_dim(mi.base.font, str_, ascent_, descent_, width_);
-       }
+       if (expanded_)
+               dim_ = cell(0).metrics(mi);
+       else
+               mathed_string_dim(mi.base.font, str_, dim_);
 }
 
 
 void MathMacroArgument::draw(MathPainterInfo & pi, int x, int y) const
 {
        if (expanded_)
-               xcell(0).draw(pi, x, y);
+               cell(0).draw(pi, x, y);
        else
                drawStrRed(pi, x, y, str_);
 }