]> sigrok.org Git - pulseview.git/commitdiff
MarginWidget: Moved mouse_down_item_ in
authorJoel Holdsworth <redacted>
Sun, 21 Dec 2014 10:58:30 +0000 (10:58 +0000)
committerJoel Holdsworth <redacted>
Mon, 29 Dec 2014 11:56:00 +0000 (11:56 +0000)
pv/view/header.cpp
pv/view/header.hpp
pv/view/marginwidget.hpp
pv/view/ruler.hpp

index 41dffca1f92323c9ece2090893aea04e90afd30f..81973802b6cb1844eca489000aaa0ef3d7f18600 100644 (file)
@@ -314,8 +314,10 @@ void Header::on_group()
                        return a->visual_v_offset() < b->visual_v_offset(); });
 
        shared_ptr<TraceGroup> group(new TraceGroup());
+       shared_ptr<RowItem> mouse_down_item(
+               std::dynamic_pointer_cast<RowItem>(mouse_down_item_));
        shared_ptr<RowItem> focus_item(
-               mouse_down_item_ ? mouse_down_item_ : selected_items.front());
+               mouse_down_item ? mouse_down_item : selected_items.front());
 
        assert(focus_item);
        assert(focus_item->owner());
index 48e06a7badab1ef16acc7c83a836bb44f088b670..62c29c16f93062420dd10957bad76d9fbdd27a5c 100644 (file)
@@ -91,9 +91,6 @@ private Q_SLOTS:
 
 Q_SIGNALS:
        void signals_moved();
-
-private:
-       std::shared_ptr<RowItem> mouse_down_item_;
 };
 
 } // namespace view
index 5b6631af724f3177e5c643bda1f0674e0ad5ccad..a97b22c1012eb859a6c5de4efabc882ed4b49cf5 100644 (file)
@@ -63,6 +63,7 @@ protected:
        pv::view::View &view_;
        QPoint mouse_point_;
        QPoint mouse_down_point_;
+       std::shared_ptr<ViewItem> mouse_down_item_;
        bool dragging_;
 };
 
index cfba0489c213c0554df35707aaac97585b4b75d6..89b9ff4c801d22b009d30087fd4346d4db039689 100644 (file)
@@ -88,9 +88,6 @@ private:
 
        int calculate_text_height() const;
 
-private:
-       std::shared_ptr<TimeItem> mouse_down_item_;
-
 private Q_SLOTS:
        void hover_point_changed();
 };