From: Joel Holdsworth Date: Sat, 17 Nov 2012 12:33:42 +0000 (+0000) Subject: Don't highlight when dragging X-Git-Tag: pulseview-0.1.0~214 X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff_plain;h=fdf5ff04d8687ac67767267e9b440a2b5d37defd;hp=da2bebfb824ac5328ef2a22121a4041d0dc37431 Don't highlight when dragging --- diff --git a/pv/view/header.cpp b/pv/view/header.cpp index e50d851f..a141b616 100644 --- a/pv/view/header.cpp +++ b/pv/view/header.cpp @@ -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 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();