Properly draw changed Captions

Fix for bug #12555.
This commit is contained in:
Daniel Ramoeller 2022-06-15 09:13:05 +02:00 committed by Juergen Spitzmueller
parent 45191d04f9
commit 3305b9301e

View File

@ -152,11 +152,7 @@ void InsetCaption::draw(PainterInfo & pi, int x, int y) const
if (non_float_)
pi.base.font.setColor(Color_error);
else
pi.base.font.setColor(pi.textColor(pi.base.font.color()).baseColor);
if (is_deleted_)
pi.base.font.setStrikeout(FONT_ON);
else if (isChanged() && lyxrc.ct_additions_underlined)
pi.base.font.setUnderbar(FONT_ON);
pi.base.font.setPaintColor(pi.textColor(pi.base.font.color()));
int const lo = leftOffset(pi.base.bv);
if (rtl_) {
InsetText::draw(pi, x, y);
@ -166,6 +162,10 @@ void InsetCaption::draw(PainterInfo & pi, int x, int y) const
pi.pain.text(x + lo, y, full_label_, pi.base.font);
InsetText::draw(pi, x + labelwidth_, y);
}
// Draw the change tracking cue on the label, unless RowPainter already
// takes care of it.
if (canPaintChange(*pi.base.bv))
pi.change.paintCue(pi, x, y, x + labelwidth_, pi.base.font);
pi.base.font = tmpfont;
}