]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathStackrel.cpp
Fix wrong mode on output for macros that shadow global macros
[lyx.git] / src / mathed / InsetMathStackrel.cpp
index 9412d9918245b493b6866c55aa9939d911e287a9..4efcfe4443d5bee9538f6f8f9e79beb5e7556a78 100644 (file)
@@ -52,8 +52,16 @@ bool InsetMathStackrel::idxUpDown(Cursor & cur, bool up) const
 }
 
 
+MathClass InsetMathStackrel::mathClass() const
+{
+       // FIXME: update this when/if \stackbin is supported
+       return MC_REL;
+}
+
+
 void InsetMathStackrel::metrics(MetricsInfo & mi, Dimension & dim) const
 {
+       Changer dummy2 = mi.base.changeEnsureMath();
        Dimension dim1;
        cell(1).metrics(mi, dim1);
        Changer dummy = mi.base.changeFrac();
@@ -70,12 +78,13 @@ void InsetMathStackrel::metrics(MetricsInfo & mi, Dimension & dim) const
                dim.asc = dim1.ascent() + dim0.height() + 4;
                dim.des = dim1.descent();
        }
-       metricsMarkers(dim);
+       metricsMarkers(mi, dim);
 }
 
 
 void InsetMathStackrel::draw(PainterInfo & pi, int x, int y) const
 {
+       Changer dummy2 = pi.base.changeEnsureMath();
        Dimension const dim = dimension(*pi.base.bv);
        Dimension const & dim0 = cell(0).dimension(*pi.base.bv);
        Dimension const & dim1 = cell(1).dimension(*pi.base.bv);