]> sigrok.org Git - pulseview.git/commitdiff
Don't highlight when dragging
authorJoel Holdsworth <redacted>
Sat, 17 Nov 2012 12:33:42 +0000 (12:33 +0000)
committerJoel Holdsworth <redacted>
Sat, 17 Nov 2012 12:34:31 +0000 (12:34 +0000)
pv/view/header.cpp

index e50d851f686d315bc584f5e92510218b85f3ad08..a141b6164754f79760fc27c291d0054b48245da6 100644 (file)
@@ -89,6 +89,7 @@ void Header::paintEvent(QPaintEvent *event)
        painter.setRenderHint(QPainter::Antialiasing);
 
        const int v_offset = _view.v_offset();
+       const bool dragging = !_drag_sigs.empty();
        BOOST_FOREACH(const shared_ptr<Signal> s, sigs)
        {
                assert(s);
@@ -97,8 +98,9 @@ void Header::paintEvent(QPaintEvent *event)
                        0, s->get_v_offset() - v_offset,
                        w, View::SignalHeight);
 
-               s->paint_label(painter, signal_heading_rect,
-                       s->pt_in_label_rect(signal_heading_rect, _mouse_point));
+               const bool highlight = !dragging && s->pt_in_label_rect(
+                       signal_heading_rect, _mouse_point);
+               s->paint_label(painter, signal_heading_rect, highlight);
        }
 
        painter.end();