commit 58e479527e101c649ce57ad8fbf6d5c4288d3d60
Author: Jean-Marc Lasgouttes <[email protected]>
Date:   Fri Dec 2 11:13:47 2016 +0100

    Reintroduce broken support for default macro arguments
    
    This got forgotten in the math typesetting rewrite.
    
    Fixes bug #10508.
---
 src/mathed/MathMacro.cpp |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/src/mathed/MathMacro.cpp b/src/mathed/MathMacro.cpp
index afc40a4..f6791bb 100644
--- a/src/mathed/MathMacro.cpp
+++ b/src/mathed/MathMacro.cpp
@@ -81,7 +81,13 @@ public:
                mrow.push_back(e_beg);
 
                mathMacro_->macro()->unlock();
-               bool has_contents = mathMacro_->cell(idx_).addToMathRow(mrow, 
mi);
+               bool has_contents;
+               // handle default macro arguments
+               if (!mathMacro_->editMetrics(mi.base.bv)
+                       && mathMacro_->cell(idx_).empty())
+                       has_contents = def_.addToMathRow(mrow, mi);
+               else
+                       has_contents = 
mathMacro_->cell(idx_).addToMathRow(mrow, mi);
                mathMacro_->macro()->lock();
 
                // if there was no contents, and the contents is editable,

Reply via email to