]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathStackrel.cpp
fix off-by-two drawing error
[lyx.git] / src / mathed / InsetMathStackrel.cpp
index 410e21f1d8298902f3090d04172a8ccac0af2614..964c078fa9b3ee4b5613b3f8734e036a407b6b0e 100644 (file)
@@ -58,15 +58,8 @@ void InsetMathStackrel::draw(PainterInfo & pi, int x, int y) const
 
 void InsetMathStackrel::write(WriteStream & os) const
 {
-       bool brace = os.pendingBrace();
-       os.pendingBrace(false);
-       if (os.latex() && os.textMode()) {
-               os << "\\ensuremath{";
-               os.textMode(false);
-               brace = true;
-       }
+       MathEnsurer ensurer(os);
        os << "\\stackrel{" << cell(0) << "}{" << cell(1) << '}';
-       os.pendingBrace(brace);
 }