From: André Pönitz Date: Tue, 15 Oct 2002 08:41:35 +0000 (+0000) Subject: fix #658 X-Git-Tag: 1.6.10~18180 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=c7b1bd5a00f0ada18b518cc64426362c51ec72f0;hp=78c2dddb78e371c5ff7f192c9df8b0be986d5dc8;p=lyx.git fix #658 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5405 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/mathed/math_parser.C b/src/mathed/math_parser.C index ff4447c2d8..7c5d2d51cd 100644 --- a/src/mathed/math_parser.C +++ b/src/mathed/math_parser.C @@ -86,13 +86,13 @@ using std::atoi; namespace { -MathInset::mode_type asMode(string const & str) +MathInset::mode_type asMode(MathInset::mode_type oldmode, string const & str) { if (str == "mathmode") return MathInset::MATH_MODE; if (str == "textmode" || str == "forcetext") return MathInset::TEXT_MODE; - return MathInset::UNDECIDED_MODE; + return oldmode; } @@ -1151,12 +1151,12 @@ void Parser::parse1(MathGridInset & grid, unsigned flags, if (l) { if (l->inset == "font") { cell->push_back(createMathInset(t.cs())); - parse(cell->back().nucleus()->cell(0), FLAG_ITEM, asMode(l->extra)); + parse(cell->back().nucleus()->cell(0), FLAG_ITEM, asMode(mode, l->extra)); } else if (l->inset == "oldfont") { cell->push_back(createMathInset(t.cs())); - parse(cell->back().nucleus()->cell(0), flags, asMode(l->extra)); + parse(cell->back().nucleus()->cell(0), flags, asMode(mode, l->extra)); return; } @@ -1179,7 +1179,7 @@ void Parser::parse1(MathGridInset & grid, unsigned flags, else { MathAtom at = createMathInset(t.cs()); for (MathInset::idx_type i = 0; i < at->nargs(); ++i) - parse(at.nucleus()->cell(i), FLAG_ITEM, asMode(l->extra)); + parse(at.nucleus()->cell(i), FLAG_ITEM, asMode(mode, l->extra)); cell->push_back(at); } }