From: Joel Holdsworth Date: Sat, 2 Jan 2016 15:47:31 +0000 (+0000) Subject: Revert "Make traces only selectable in the header area" X-Git-Tag: pulseview-0.3.0~7 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=0c2389230c90d8bf34b601c625bcf655b24e8f52;p=pulseview.git Revert "Make traces only selectable in the header area" This reverts commit 35365c66bf6166c5607f1180016528d996a45b66. --- diff --git a/pv/view/trace.cpp b/pv/view/trace.cpp index ee0a4f0e..f7e7ebf2 100644 --- a/pv/view/trace.cpp +++ b/pv/view/trace.cpp @@ -91,16 +91,6 @@ bool Trace::is_draggable() const return (cursor_pos.x() <= view->header_size().width()); } -void Trace::select(bool select) -{ - // Trace can only be selected if the mouse cursor is in the header area; - // as is_draggable() checks the same thing, we re-use it here - if (is_draggable() && select) - selected_ = true; - else - selected_ = false; -} - void Trace::paint_label(QPainter &p, const QRect &rect, bool hover) { const int y = get_visual_y(); diff --git a/pv/view/trace.hpp b/pv/view/trace.hpp index 88e54b1a..acaa341a 100644 --- a/pv/view/trace.hpp +++ b/pv/view/trace.hpp @@ -86,11 +86,6 @@ public: */ bool is_draggable() const; - /** - * Selects or deselects the signal. - */ - void select(bool select = true); - /** * Computes the outline rectangle of the viewport hit-box. * @param rect the rectangle of the viewport area. diff --git a/pv/view/viewitem.hpp b/pv/view/viewitem.hpp index c9da948e..a4eb6aef 100644 --- a/pv/view/viewitem.hpp +++ b/pv/view/viewitem.hpp @@ -167,6 +167,8 @@ protected: protected: QWidget *context_parent_; QPoint drag_point_; + +private: bool selected_; };