]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathXYArrow.cpp
fix off-by-two drawing error
[lyx.git] / src / mathed / InsetMathXYArrow.cpp
index 866c3bb1d64bf32f9fe5b2df9155d9decede5afa..c51a26dcc2b1934c21bd3ed7715fd9d960d756ee 100644 (file)
@@ -140,20 +140,13 @@ void InsetMathXYArrow::draw(PainterInfo & pi, int x, int y) const
 
 void InsetMathXYArrow::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 << "\\ar";
        if (cell(0).size())
                os << '[' << cell(0) << ']';
        if (cell(1).size())
                os << (up_ ? '^' : '_') << '{' << cell(1) << '}';
        os << " ";
-       os.pendingBrace(brace);
 }