Author: baum
Date: Fri Jan 21 20:18:27 2011
New Revision: 37288
URL: http://www.lyx.org/trac/changeset/37288

Log:
Fix bug #7252

Modified:
   lyx-devel/trunk/src/mathed/InsetMathOverset.cpp
   lyx-devel/trunk/src/mathed/InsetMathUnderset.cpp

Modified: lyx-devel/trunk/src/mathed/InsetMathOverset.cpp
==============================================================================
--- lyx-devel/trunk/src/mathed/InsetMathOverset.cpp     Fri Jan 21 19:29:10 
2011        (r37287)
+++ lyx-devel/trunk/src/mathed/InsetMathOverset.cpp     Fri Jan 21 20:18:27 
2011        (r37288)
@@ -74,6 +74,8 @@
 void InsetMathOverset::write(WriteStream & os) const
 {
        MathEnsurer ensurer(os);
+       if (os.fragile())
+               os << "\\protect";
        os << "\\overset{" << cell(0) << "}{" << cell(1) << '}';
 }
 

Modified: lyx-devel/trunk/src/mathed/InsetMathUnderset.cpp
==============================================================================
--- lyx-devel/trunk/src/mathed/InsetMathUnderset.cpp    Fri Jan 21 19:29:10 
2011        (r37287)
+++ lyx-devel/trunk/src/mathed/InsetMathUnderset.cpp    Fri Jan 21 20:18:27 
2011        (r37288)
@@ -85,6 +85,8 @@
 void InsetMathUnderset::write(WriteStream & os) const
 {
        MathEnsurer ensurer(os);
+       if (os.fragile())
+               os << "\\protect";
        os << "\\underset{" << cell(0) << "}{" << cell(1) << '}';
 }
 

Reply via email to