]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathStackrel.cpp
Removed unused private variable
[lyx.git] / src / mathed / InsetMathStackrel.cpp
index d43e466964171395f0344bd8a016e6b65ed3e0da..dc01ffca90c20c6afa2fbffbe62a567f3cec6e37 100644 (file)
 
 #include "InsetMathStackrel.h"
 
-#include "Cursor.h"
-#include "LaTeXFeatures.h"
 #include "MathData.h"
 #include "MathStream.h"
 
+#include "Cursor.h"
+#include "LaTeXFeatures.h"
+#include "MetricsInfo.h"
+
 using namespace std;
 
 namespace lyx {
@@ -50,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();
@@ -68,12 +78,12 @@ void InsetMathStackrel::metrics(MetricsInfo & mi, Dimension & dim) const
                dim.asc = dim1.ascent() + dim0.height() + 4;
                dim.des = dim1.descent();
        }
-       metricsMarkers(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);
@@ -87,7 +97,6 @@ void InsetMathStackrel::draw(PainterInfo & pi, int x, int y) const
                int y2 = y + dim1.descent() + dim2.ascent() + 1;
                cell(2).draw(pi, m - dim2.width() / 2, y2);
        }
-       drawMarkers(pi, x, y);
 }