]> git.lyx.org Git - features.git/commitdiff
Fix display of empty box in nested macros
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 9 Jan 2017 17:23:17 +0000 (18:23 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 10 Jan 2017 13:14:57 +0000 (14:14 +0100)
The rewrite of nesting handling at 0f15dcc6 was incomplete: the
macro nesting has to be reset to 0 when inside a macro argument at
level 1.

src/mathed/MathMacro.cpp

index 1311bc9c2ce49d405f093622c72c0ded4cbdd94e..7670f487dba1e1867049535164a7fe9cb4d90610 100644 (file)
@@ -82,7 +82,8 @@ public:
                // macro arguments are in macros
                LATTEST(mathMacro_->nesting() > 0);
                /// The macro nesting can change display of insets. Change it locally.
-               Changer chg = make_change(mi.base.macro_nesting, mathMacro_->nesting());
+               Changer chg = make_change(mi.base.macro_nesting,
+                                         mathMacro_->nesting() == 1 ? 0 : mathMacro_->nesting());
 
                MathRow::Element e_beg(MathRow::BEG_ARG);
                e_beg.macro = mathMacro_;