From c7b1bd5a00f0ada18b518cc64426362c51ec72f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Tue, 15 Oct 2002 08:41:35 +0000 Subject: [PATCH] fix #658 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5405 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/math_parser.C | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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); } }