]> git.lyx.org Git - features.git/commitdiff
Fix bug #6581: Empty base of a script inset should not be shown as an empty brace...
authorEnrico Forestieri <forenr@lyx.org>
Wed, 10 Mar 2010 20:10:30 +0000 (20:10 +0000)
committerEnrico Forestieri <forenr@lyx.org>
Wed, 10 Mar 2010 20:10:30 +0000 (20:10 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33705 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/MathParser.cpp

index 77ba3bf485d7ca523e912fff10981d88c63ea93e..f80dba73038976e13fe867bad093168c4833c35e 100644 (file)
@@ -935,6 +935,14 @@ bool Parser::parse1(InsetMathGrid & grid, unsigned flags,
                        // in an unreliable way. See this thread
                        // http://www.mail-archive.com/lyx-devel%40lists.lyx.org/msg104917.html
                        // for more details.
+                       // However, we remove empty braces because they look
+                       // ugly on screen and we are sure that they were added
+                       // by the write() method (and will be re-added on save).
+                       if (p->nuc().size() == 1 &&
+                           p->nuc().back()->asBraceInset() &&
+                           p->nuc().back()->asBraceInset()->cell(0).empty())
+                               p->nuc().erase(0);
+
                        parse(p->cell(p->idxOfScript(up)), FLAG_ITEM, mode);
                        if (limits) {
                                p->limits(limits);