X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fviews%2Ftrace%2Fview.cpp;h=98fd46d2ad4684fb81051956c0995f579abc49d0;hb=16a832bc5bb4cce24598537c99e0655edb65c1d0;hp=d559b0af5f6bcde346d3cef0b84f31fd80278505;hpb=5a20644617a727e5893cd1df3f105135c1ebdedd;p=pulseview.git diff --git a/pv/views/trace/view.cpp b/pv/views/trace/view.cpp index d559b0a..98fd46d 100644 --- a/pv/views/trace/view.cpp +++ b/pv/views/trace/view.cpp @@ -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 @@ -385,7 +385,7 @@ void View::restore_settings(QSettings &settings) boost::archive::text_iarchive ia(ss); ia >> boost::serialization::make_nvp("ruler_shift", shift); ruler_shift_ = shift; - } catch (boost::archive::archive_exception) { + } catch (boost::archive::archive_exception&) { qDebug() << "Could not restore the view ruler shift"; } } @@ -400,7 +400,7 @@ void View::restore_settings(QSettings &settings) ia >> boost::serialization::make_nvp("offset", offset); // This also updates ruler_offset_ set_offset(offset); - } catch (boost::archive::archive_exception) { + } catch (boost::archive::archive_exception&) { qDebug() << "Could not restore the view offset"; } } @@ -619,8 +619,6 @@ Trace::SegmentDisplayMode View::segment_display_mode() const void View::set_segment_display_mode(Trace::SegmentDisplayMode mode) { - trigger_markers_.clear(); - segment_display_mode_ = mode; for (shared_ptr signal : signals_) @@ -700,23 +698,6 @@ void View::zoom_fit(bool gui_state) set_scale_offset(scale.convert_to(), extents.first); } -void View::zoom_one_to_one() -{ - using pv::data::SignalData; - - // Make a set of all the visible data objects - set< shared_ptr > 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 +797,7 @@ bool View::cursors_shown() const void View::show_cursors(bool show) { show_cursors_ = show; + cursor_state_changed(show); ruler_->update(); viewport_->update(); } @@ -1071,8 +1053,10 @@ void View::update_scroll() vscrollbar->setRange(extents.first - areaSize.height(), extents.second); - if (scroll_needs_defaults_) + if (scroll_needs_defaults_) { set_scroll_default(); + scroll_needs_defaults_ = false; + } } void View::reset_scroll()