From 9bec4b8a0ababb6b18c41df946fcf7e893100d94 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Mon, 15 Jan 2018 17:23:48 +0100 Subject: [PATCH] Fix repaint of unselected branch 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. --- src/RowPainter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RowPainter.cpp b/src/RowPainter.cpp index a5cb04b601..115efba631 100644 --- a/src/RowPainter.cpp +++ b/src/RowPainter.cpp @@ -77,7 +77,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; } -- 2.39.5