]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathSplit.cpp
* src/mathed/InsetMathHull.cpp:
[lyx.git] / src / mathed / InsetMathSplit.cpp
index 95fbc80f5fb85d9bb498aaf187dd72519751b49d..4420e9e5b56fdffdb645bbca81357cee08ed91ed 100644 (file)
@@ -87,13 +87,7 @@ bool InsetMathSplit::getStatus(Cursor & cur, FuncRequest const & cmd,
 
 void InsetMathSplit::write(WriteStream & ws) const
 {
-       bool brace = ws.pendingBrace();
-       ws.pendingBrace(false);
-       if (ws.latex() && ws.textMode()) {
-               ws << "\\ensuremath{";
-               ws.textMode(false);
-               brace = true;
-       }
+       MathEnsurer ensurer(ws);
        if (ws.fragile())
                ws << "\\protect";
        ws << "\\begin{" << name_ << '}';
@@ -105,7 +99,6 @@ void InsetMathSplit::write(WriteStream & ws) const
        if (ws.fragile())
                ws << "\\protect";
        ws << "\\end{" << name_ << "}\n";
-       ws.pendingBrace(brace);
 }