From 58e479527e101c649ce57ad8fbf6d5c4288d3d60 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Fri, 2 Dec 2016 11:13:47 +0100 Subject: [PATCH] Reintroduce broken support for default macro arguments This got forgotten in the math typesetting rewrite. Fixes bug #10508. --- src/mathed/MathMacro.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/mathed/MathMacro.cpp b/src/mathed/MathMacro.cpp index afc40a4910..f6791bbf76 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, -- 2.39.2