From: Joel Holdsworth Date: Sat, 2 Jan 2016 15:56:59 +0000 (+0000) Subject: Trace: Removed hit_box_rect, to remove canvas dragging support X-Git-Tag: pulseview-0.3.0~5 X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff_plain;h=35fbb043b35920ac9e8175a7bfaa7bf9b2611dfc;ds=sidebyside Trace: Removed hit_box_rect, to remove canvas dragging support --- diff --git a/pv/view/trace.cpp b/pv/view/trace.cpp index f7bba9ff..264541cf 100644 --- a/pv/view/trace.cpp +++ b/pv/view/trace.cpp @@ -175,13 +175,6 @@ QRectF Trace::label_rect(const QRectF &rect) const label_size.height()); } -QRectF Trace::hit_box_rect(const ViewItemPaintParams &pp) const -{ - const float h = QFontMetrics(QApplication::font()).height(); - return QRectF(pp.left(), get_visual_y() - h / 2.0f, - pp.width(), h); -} - void Trace::paint_back(QPainter &p, const ViewItemPaintParams &pp) { if (coloured_bg_) diff --git a/pv/view/trace.hpp b/pv/view/trace.hpp index c9582c61..cb5ac15c 100644 --- a/pv/view/trace.hpp +++ b/pv/view/trace.hpp @@ -81,13 +81,6 @@ public: */ void set_coloured_bg(bool state); - /** - * Computes the outline rectangle of the viewport hit-box. - * @param rect the rectangle of the viewport area. - * @return Returns the rectangle of the hit-box. - */ - QRectF hit_box_rect(const ViewItemPaintParams &pp) const; - /** * Paints the signal label. * @param p the QPainter to paint into.