Fix repaint of unselected paragraph label

This works around a TextMetrics issue where Row::beg/end_margin_sel
are sometimes not reset correctly when there is no selection on the
row.

In master a fix for this problem has been done at 654cded1. Here we
prefer a much simpler work around that fixes the symptom.

Fixes bug #10972.

(cherry picked from commit 9bec4b8a0a)
This commit is contained in:
Jean-Marc Lasgouttes 2018-01-15 17:23:48 +01:00
parent a1d643131a
commit f66807dd80
2 changed files with 3 additions and 1 deletions

View File

@ -93,7 +93,7 @@ FontInfo RowPainter::labelFont() const
{ {
FontInfo f = text_.labelFont(par_); FontInfo f = text_.labelFont(par_);
// selected text? // selected text?
if (row_.begin_margin_sel || pi_.selected) if ((row_.selection() && row_.begin_margin_sel) || pi_.selected)
f.setPaintColor(Color_selectiontext); f.setPaintColor(Color_selectiontext);
return f; return f;
} }

View File

@ -127,6 +127,8 @@ What's new
- Fix bad justification before a displayed inset (bug 10699). - Fix bad justification before a displayed inset (bug 10699).
- Fix selection display glitch with paragraph label (bug 10972).
- Fix cursor state after double/triple click in mathed (bug #10686). - Fix cursor state after double/triple click in mathed (bug #10686).
- Avoid a case of stuck cursor after entering an inset (bug 10630). - Avoid a case of stuck cursor after entering an inset (bug 10630).