]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathXArrow.cpp
* src/mathed/InsetMathHull.cpp:
[lyx.git] / src / mathed / InsetMathXArrow.cpp
index 78d5390a3f9d48d13b3db264fbb2d080eae0319b..eda56040dd63b91b98aedd5a6249896f584e652f 100644 (file)
@@ -62,20 +62,11 @@ void InsetMathXArrow::draw(PainterInfo & pi, int x, int y) const
 
 void InsetMathXArrow::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 << '\\' << name_;
        if (cell(1).size())
                os << '[' << cell(1) << ']';
        os << '{' << cell(0) << '}';
-
-       os.pendingBrace(brace);
 }