]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathSqrt.cpp
Whitespace.
[lyx.git] / src / mathed / InsetMathSqrt.cpp
index 11304a9bd1800ea18d96c35fe7fe8aedca2e1583..f738e2c17bc516db242b681850146839f7050244 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.
  */
@@ -19,8 +19,8 @@
 
 namespace lyx {
 
-InsetMathSqrt::InsetMathSqrt()
-       : InsetMathNest(1)
+InsetMathSqrt::InsetMathSqrt(Buffer * buf)
+       : InsetMathNest(buf, 1)
 {}
 
 
@@ -80,15 +80,8 @@ void InsetMathSqrt::drawT(TextPainter & /*pain*/, int /*x*/, int /*y*/) const
 
 void InsetMathSqrt::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 << "\\sqrt{" << cell(0) << '}';
-       os.pendingBrace(brace);
 }