]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_substackinset.C
Fix reading of math macros
[lyx.git] / src / mathed / math_substackinset.C
index 43395d993713c1561bf4880f1d3d371a98999ddf..29850787be174a99d1fab6252f3c5a46ba67650d 100644 (file)
@@ -20,12 +20,14 @@ MathInset * MathSubstackInset::clone() const
 }
 
 
-void MathSubstackInset::metrics(MathMetricsInfo const & st) const
+void MathSubstackInset::metrics(MathMetricsInfo & mi) const
 {
-       MathMetricsInfo mi = st;
-       if (mi.style == LM_ST_DISPLAY)
-               mi.style = LM_ST_TEXT;
-       MathGridInset::metrics(mi);
+       if (mi.base.style == LM_ST_DISPLAY) {
+               MathStyleChanger dummy(mi.base, LM_ST_TEXT);
+               MathGridInset::metrics(mi);
+       } else {
+               MathGridInset::metrics(mi);
+       }
 }
 
 
@@ -41,7 +43,7 @@ void MathSubstackInset::normalize(NormalStream & os) const
 {
        os << "[substack ";
        MathGridInset::normalize(os);
-       os << "]";
+       os << ']';
 }
 
 
@@ -49,5 +51,5 @@ void MathSubstackInset::maplize(MapleStream & os) const
 {
        os << "substack(";
        MathGridInset::maplize(os);
-       os << ")";
+       os << ')';
 }