]> sigrok.org Git - pulseview.git/commitdiff
Revert "Make traces non-draggable outside the header area"
authorJoel Holdsworth <redacted>
Sat, 2 Jan 2016 15:47:39 +0000 (15:47 +0000)
committerUwe Hermann <redacted>
Sun, 3 Jan 2016 19:09:30 +0000 (20:09 +0100)
This reverts commit e081bf3d864d5662716668d6b4adcb0871d11dae.

pv/view/trace.cpp
pv/view/trace.hpp
pv/view/view.cpp
pv/view/view.hpp

index f7e7ebf25b8ec00a351bb415f7fe696de155e8b6..f7bba9ff31506e5a5fa68abaacfe1fe3163e321e 100644 (file)
@@ -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();
index acaa341adbadd55f477e32d1f3e01d9cd4c662f6..c9582c61218409616c7119d1cc894f6ae0cecafd 100644 (file)
@@ -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.
index 124048bda8f9c63c1b14a5e770977ab89e09e37c..c9b08bf8c0445de0783d5bbb16d4d4275f5066f1 100644 (file)
@@ -203,11 +203,6 @@ const Viewport* View::viewport() const
        return viewport_;
 }
 
-const QSize View::header_size() const
-{
-       return header_->sizeHint();
-}
-
 vector< shared_ptr<TimeItem> > View::time_items() const
 {
        const vector<shared_ptr<Flag>> f(flags());
index 8aa551250177199a297d73998b01fab1bd8a79f5..635273dae74ad6e1131a592da699beba6a8e76e7 100644 (file)
@@ -95,8 +95,6 @@ public:
 
        const Viewport* viewport() const;
 
-       const QSize header_size() const;
-
        /**
         * Gets a list of time markers.
         */