]> git.lyx.org Git - features.git/commitdiff
Correct refinement fix for #6595. The problem was not adding \\ to the last
authorEnrico Forestieri <forenr@lyx.org>
Mon, 5 Jul 2010 12:31:18 +0000 (12:31 +0000)
committerEnrico Forestieri <forenr@lyx.org>
Mon, 5 Jul 2010 12:31:18 +0000 (12:31 +0000)
empty line of substack, tabular and xymatrix, but not calling delEmptyLastRow
for them.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34763 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/MathParser.cpp

index b4d4102bfb66840ef7a522393103b062eed90b4b..bd66b0b5e2ba4b499c835df267f4a1678ffcf15e 100644 (file)
@@ -249,7 +249,8 @@ void delEmptyLastRow(InsetMathGrid & grid)
 bool innerHull(docstring const & name)
 {
        return name == "array" || name == "cases" || name == "aligned"
-               || name == "alignedat" || name == "gathered" || name == "split";
+               || name == "alignedat" || name == "gathered" || name == "split"
+               || name == "tabular";
 }
 
 
@@ -1694,6 +1695,11 @@ bool Parser::parse1(InsetMathGrid & grid, unsigned flags,
                else if (t.cs() == "substack") {
                        cell->push_back(createInsetMath(t.cs(), buf));
                        parse2(cell->back(), FLAG_ITEM, mode, false);
+                       // Delete empty last row if present
+                       InsetMathGrid & subgrid =
+                               *(cell->back().nucleus()->asGridInset());
+                       if (subgrid.nrows() > 1)
+                               delEmptyLastRow(subgrid);
                }
 
                else if (t.cs() == "xymatrix") {
@@ -1702,6 +1708,11 @@ bool Parser::parse1(InsetMathGrid & grid, unsigned flags,
                                os << getToken().asInput();
                        cell->push_back(createInsetMath(t.cs() + os.str(), buf));
                        parse2(cell->back(), FLAG_ITEM, mode, false);
+                       // Delete empty last row if present
+                       InsetMathGrid & subgrid =
+                               *(cell->back().nucleus()->asGridInset());
+                       if (subgrid.nrows() > 1)
+                               delEmptyLastRow(subgrid);
                }
 
                else if (t.cs() == "framebox" || t.cs() == "makebox") {