]> git.lyx.org Git - features.git/blobdiff - src/mathed/InsetMathNest.cpp
Implement the suggestion by Andre'
[features.git] / src / mathed / InsetMathNest.cpp
index 372c30786a9fa182ddbaf76449f063305be58048..85d0be52b8435f39b4ed592e6f6f50f01b1c6701 100644 (file)
@@ -336,8 +336,7 @@ MathData InsetMathNest::glue() const
 
 void InsetMathNest::write(WriteStream & os) const
 {
-       bool textmode = os.textMode();
-       os.textMode(currentMode() == TEXT_MODE);
+       ModeSpecifier specifier(os, currentMode());
        docstring const latex_name = name().c_str();
        os << '\\' << latex_name;
        for (size_t i = 0; i < nargs(); ++i)
@@ -348,7 +347,6 @@ void InsetMathNest::write(WriteStream & os) const
                os << "\\lyxlock";
                os.pendingSpace(true);
        }
-       os.textMode(textmode);
 }