From f6b0ccf99c1f2e3eb836883dc574e861ca84194f Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Mon, 12 Jun 2017 15:14:23 +0200 Subject: [PATCH] Use proper markers for display version of the math macro template. This avoids ghost white corners when the macro does not have a display version. Part of bug #8883. --- src/mathed/MathMacroTemplate.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/mathed/MathMacroTemplate.cpp b/src/mathed/MathMacroTemplate.cpp index d4cf4cfa56..e12856a15f 100644 --- a/src/mathed/MathMacroTemplate.cpp +++ b/src/mathed/MathMacroTemplate.cpp @@ -189,6 +189,8 @@ public: DisplayLabelBox(Buffer * buf, MathAtom const & atom, docstring label, MathMacroTemplate const & parent); + /// + marker_type marker(BufferView const *) const; /// void metrics(MetricsInfo & mi, Dimension & dim) const; /// @@ -215,6 +217,16 @@ Inset * DisplayLabelBox::clone() const } +InsetMath::marker_type DisplayLabelBox::marker(BufferView const * bv) const +{ + if (parent_.editing(bv) + || !parent_.cell(parent_.displayIdx()).empty()) + return MARKER; + else + return NO_MARKER; +} + + void DisplayLabelBox::metrics(MetricsInfo & mi, Dimension & dim) const { InsetLabelBox::metrics(mi, dim); -- 2.39.2