]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/MathData.cpp
typo
[lyx.git] / src / mathed / MathData.cpp
index b4cbfe4ddd12c48fff24fdccea2a0b7e22e7cc68..d3ce3a31c877ec03843005424a0351b3d044ac7d 100644 (file)
@@ -224,6 +224,7 @@ bool MathData::addToMathRow(MathRow & mrow, MetricsInfo & mi) const
 {
        bool has_contents = false;
        BufferView * bv = mi.base.bv;
+       display_style_ = mi.base.font.style() == DISPLAY_STYLE;
        MathData * ar = const_cast<MathData*>(this);
        ar->updateMacros(&bv->cursor(), mi.macrocontext,
                         InternalUpdate, mi.base.macro_nesting);
@@ -968,6 +969,17 @@ MathClass MathData::mathClass() const
 }
 
 
+MathClass MathData::firstMathClass() const
+{
+       for (MathAtom const & at : *this) {
+               MathClass mc = at->mathClass();
+               if (mc != MC_UNKNOWN)
+                       return mc;
+       }
+       return MC_ORD;
+}
+
+
 MathClass MathData::lastMathClass() const
 {
        MathClass res = MC_ORD;