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.
This commit is contained in:
Jean-Marc Lasgouttes 2017-06-12 15:14:23 +02:00
parent 71563835c7
commit f6b0ccf99c

View File

@ -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);