]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathEnv.cpp
fix off-by-two drawing error
[lyx.git] / src / mathed / InsetMathEnv.cpp
index f04d87119f7d9f48bc5129452e2e92b39e228287..3daba8179de46d9030624ae1fe26fcba5a299d1d 100644 (file)
@@ -48,15 +48,8 @@ void InsetMathEnv::draw(PainterInfo & pi, int x, int y) const
 
 void InsetMathEnv::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 << "\\begin{" << name_ << '}' << cell(0) << "\\end{" << name_ << '}';
-       os.pendingBrace(brace);
 }