]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathBig.cpp
Fix bug 5802 (http://bugzilla.lyx.org/show_bug.cgi?id=5802)
[lyx.git] / src / mathed / InsetMathBig.cpp
index 6e54064aca4cfa2476c3a55d512d4a0dc6264e9e..a707ab10e416147a8a57b35018173cc9fc39e011 100644 (file)
@@ -3,7 +3,7 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
- * \author André Pönitz
+ * \author André Pönitz
  *
  * Full author contact details are available in file CREDITS.
  */
@@ -89,17 +89,10 @@ void InsetMathBig::draw(PainterInfo & pi, int x, int y) const
 
 void InsetMathBig::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_ << delim_;
        if (delim_[0] == '\\')
                os.pendingSpace(true);
-       os.pendingBrace(brace);
 }