]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathUnderset.cpp
Fix bug 5802 (http://bugzilla.lyx.org/show_bug.cgi?id=5802)
[lyx.git] / src / mathed / InsetMathUnderset.cpp
index ae5ab36228de8ab3b4d5b3b2637a39752a4c7f09..92688bc99c11fe3cc3c5dbf330262e3baa9e91ba 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.
  */
@@ -84,15 +84,8 @@ bool InsetMathUnderset::idxUpDown(Cursor & cur, bool up) const
 
 void InsetMathUnderset::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 << "\\underset{" << cell(0) << "}{" << cell(1) << '}';
-       os.pendingBrace(brace);
 }