Fix #1198 by removing the 1:1 zoom button
[pulseview.git] / pv / views / trace / view.cpp
index d559b0af5f6bcde346d3cef0b84f31fd80278505..3cb26ec400be3028d005b4c3b8d3b61d1c7a2a50 100644 (file)
@@ -246,7 +246,7 @@ void View::reset_view_state()
        suppress_zoom_to_fit_after_acq_ = false;
 
        show_cursors_ = false;
-       cursors_.reset();
+       cursor_state_changed(show_cursors_);
        flags_.clear();
 
        // Update the zoom state
@@ -700,23 +700,6 @@ void View::zoom_fit(bool gui_state)
        set_scale_offset(scale.convert_to<double>(), extents.first);
 }
 
-void View::zoom_one_to_one()
-{
-       using pv::data::SignalData;
-
-       // Make a set of all the visible data objects
-       set< shared_ptr<SignalData> > visible_data = get_visible_data();
-       if (visible_data.empty())
-               return;
-
-       assert(viewport_);
-       const int w = viewport_->width();
-       if (w <= 0)
-               return;
-
-       set_zoom(1.0 / session_.get_samplerate(), w / 2);
-}
-
 void View::set_scale_offset(double scale, const Timestamp& offset)
 {
        // Disable sticky scrolling / always zoom to fit when acquisition runs
@@ -816,6 +799,7 @@ bool View::cursors_shown() const
 void View::show_cursors(bool show)
 {
        show_cursors_ = show;
+       cursor_state_changed(show);
        ruler_->update();
        viewport_->update();
 }