]> sigrok.org Git - pulseview.git/blobdiff - pv/view/view.hpp
View: Store CursorPair in a shared_ptr
[pulseview.git] / pv / view / view.hpp
index a23f284825d17534b6edcf11df3a2e302610d661..026c7683ffaef224c501ed94ad6cdbe586452742 100644 (file)
@@ -159,12 +159,7 @@ public:
        /**
         * Returns a reference to the pair of cursors.
         */
-       CursorPair& cursors();
-
-       /**
-        * Returns a reference to the pair of cursors.
-        */
-       const CursorPair& cursors() const;
+       std::shared_ptr<CursorPair> cursors() const;
 
        const QPoint& hover_point() const;
 
@@ -279,7 +274,7 @@ private:
        unsigned int tick_prefix_;
 
        bool show_cursors_;
-       CursorPair cursors_;
+       std::shared_ptr<CursorPair> cursors_;
 
        QPoint hover_point_;