]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathSubstack.cpp
Make undo action no-ops when the buffer is read-only
[lyx.git] / src / mathed / InsetMathSubstack.cpp
index f44bf9f78008f1da66a13954af65377e69ac7b4e..11678b559d91226093474bbe052d1477fed7ad90 100644 (file)
@@ -97,9 +97,11 @@ void InsetMathSubstack::infoize(odocstream & os) const
 }
 
 
-void InsetMathSubstack::write(WriteStream & os) const
+void InsetMathSubstack::write(TeXMathStream & os) const
 {
        MathEnsurer ensurer(os);
+       if (os.fragile())
+               os << "\\protect";
        os << "\\substack{";
        bool open = os.startOuterRow();
        InsetMathGrid::write(os);