From: Joel Holdsworth Date: Sat, 2 Jan 2016 15:47:39 +0000 (+0000) Subject: Revert "Make traces non-draggable outside the header area" X-Git-Tag: pulseview-0.3.0~6 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=9d4010c7f02b1c7575db2fb163b0d6daf323c1a9;p=pulseview.git Revert "Make traces non-draggable outside the header area" This reverts commit e081bf3d864d5662716668d6b4adcb0871d11dae. --- diff --git a/pv/view/trace.cpp b/pv/view/trace.cpp index f7e7ebf2..f7bba9ff 100644 --- a/pv/view/trace.cpp +++ b/pv/view/trace.cpp @@ -80,17 +80,6 @@ void Trace::set_coloured_bg(bool state) coloured_bg_ = state; } -bool Trace::is_draggable() const -{ - const View *const view = owner_->view(); - assert(view); - - QPoint cursor_pos = view->mapFromGlobal(QCursor::pos()); - - // The signal is draggable only in the header area - return (cursor_pos.x() <= view->header_size().width()); -} - 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 acaa341a..c9582c61 100644 --- a/pv/view/trace.hpp +++ b/pv/view/trace.hpp @@ -81,11 +81,6 @@ public: */ void set_coloured_bg(bool state); - /** - * Returns true if the item may be dragged/moved. - */ - bool is_draggable() const; - /** * Computes the outline rectangle of the viewport hit-box. * @param rect the rectangle of the viewport area. diff --git a/pv/view/view.cpp b/pv/view/view.cpp index 124048bd..c9b08bf8 100644 --- a/pv/view/view.cpp +++ b/pv/view/view.cpp @@ -203,11 +203,6 @@ const Viewport* View::viewport() const return viewport_; } -const QSize View::header_size() const -{ - return header_->sizeHint(); -} - vector< shared_ptr > View::time_items() const { const vector> f(flags()); diff --git a/pv/view/view.hpp b/pv/view/view.hpp index 8aa55125..635273da 100644 --- a/pv/view/view.hpp +++ b/pv/view/view.hpp @@ -95,8 +95,6 @@ public: const Viewport* viewport() const; - const QSize header_size() const; - /** * Gets a list of time markers. */