commit f66807dd8099137a53fa8480173c09fc96a57b94
Author: Jean-Marc Lasgouttes <lasgout...@lyx.org>
Date:   Mon Jan 15 17:23:48 2018 +0100

    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 9bec4b8a0ababb6b18c41df946fcf7e893100d94)
---
 src/RowPainter.cpp |    2 +-
 status.22x         |    2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/RowPainter.cpp b/src/RowPainter.cpp
index fd014a7..ca2fea7 100644
--- a/src/RowPainter.cpp
+++ b/src/RowPainter.cpp
@@ -93,7 +93,7 @@ FontInfo RowPainter::labelFont() const
 {
        FontInfo f = text_.labelFont(par_);
        // selected text?
-       if (row_.begin_margin_sel || pi_.selected)
+       if ((row_.selection() && row_.begin_margin_sel) || pi_.selected)
                f.setPaintColor(Color_selectiontext);
        return f;
 }
diff --git a/status.22x b/status.22x
index 7fc5405..d641a7a 100644
--- a/status.22x
+++ b/status.22x
@@ -127,6 +127,8 @@ What's new
 
 - 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).
 
 - Avoid a case of stuck cursor after entering an inset (bug 10630).

Reply via email to