From fdf5ff04d8687ac67767267e9b440a2b5d37defd Mon Sep 17 00:00:00 2001 From: Joel Holdsworth Date: Sat, 17 Nov 2012 12:33:42 +0000 Subject: [PATCH] Don't highlight when dragging --- pv/view/header.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pv/view/header.cpp b/pv/view/header.cpp index e50d851..a141b61 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(); -- 2.30.2