]> sigrok.org Git - pulseview.git/commitdiff
CursorPair: Draw highlight when selected
authorJoel Holdsworth <redacted>
Mon, 8 Dec 2014 23:26:03 +0000 (23:26 +0000)
committerUwe Hermann <redacted>
Wed, 10 Dec 2014 17:06:16 +0000 (18:06 +0100)
pv/view/cursorpair.cpp

index f9f7ba21ea93faa865653914086e2b4718d3b23b..2ad8eef6b50f818478dfdec875be9031676c7145 100644 (file)
@@ -118,6 +118,12 @@ void CursorPair::draw_markers(QPainter &p, const QRect &rect)
        {
                const int highlight_radius = delta_rect.height() / 2 - 2;
 
+               if (selected()) {
+                       p.setBrush(Qt::transparent);
+                       p.setPen(highlight_pen());
+                       p.drawRoundedRect(delta_rect, radius, radius);
+               }
+
                p.setBrush(Cursor::FillColour);
                p.setPen(Cursor::FillColour.darker());
                p.drawRoundedRect(delta_rect, radius, radius);