]> sigrok.org Git - pulseview.git/blobdiff - pv/views/trace/view.hpp
Fix #236 by introducing "zoom-to-fit when acquisition stops" option
[pulseview.git] / pv / views / trace / view.hpp
index bfa7ed3eaa5b4ed16e909aa75cb22587760aee76..a42f964e0a173126b2cba892b7c803ae82cf8d89 100644 (file)
@@ -116,9 +116,9 @@ public:
 #ifdef ENABLE_DECODE
        virtual void clear_decode_signals();
 
-       virtual void add_decode_signal(shared_ptr<data::SignalBase> signalbase);
+       virtual void add_decode_signal(shared_ptr<data::DecodeSignal> signal);
 
-       virtual void remove_decode_signal(shared_ptr<data::SignalBase> signalbase);
+       virtual void remove_decode_signal(shared_ptr<data::DecodeSignal> signal);
 #endif
 
        /**
@@ -454,6 +454,16 @@ private:
 
        // A nonzero value indicates the v offset to restore. See View::resizeEvent()
        int saved_v_offset_;
+
+       // These are used to determine whether the view was altered after acq started
+       double scale_at_acq_start_;
+       pv::util::Timestamp offset_at_acq_start_;
+
+       // Used to suppress performing a "zoom to fit" when the session stops. This
+       // is needed when the view's settings are restored before acquisition ends.
+       // In that case we want to keep the restored settings, not have a "zoom to fit"
+       // mess them up.
+       bool suppress_zoom_to_fit_after_acq_;
 };
 
 } // namespace trace