X-Git-Url: http://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fview%2Fview.cpp;fp=pv%2Fview%2Fview.cpp;h=772a95e07156f3232f24fd19fd46796b0711a7f3;hp=97a6bcf74b5bc78d7068c9d9b1615f203208b418;hb=5ed05b699e5367bae21828f533e3d169b9bab348;hpb=17c7f31c7bb674d5017a8de66a5816e34542abb8 diff --git a/pv/view/view.cpp b/pv/view/view.cpp index 97a6bcf7..772a95e0 100644 --- a/pv/view/view.cpp +++ b/pv/view/view.cpp @@ -96,7 +96,6 @@ const Timestamp View::MaxScale("1e9"); const Timestamp View::MinScale("1e-12"); const int View::MaxScrollValue = INT_MAX / 2; -const int View::MaxViewAutoUpdateRate = 25; // No more than 25 Hz with sticky scrolling const int View::ScaleUnits[3] = {1, 2, 5}; @@ -178,11 +177,6 @@ View::View(Session &session, bool is_main_view, QWidget *parent) : this, SLOT(process_sticky_events())); lazy_event_handler_.setSingleShot(true); - connect(&delayed_view_updater_, SIGNAL(timeout()), - this, SLOT(perform_delayed_view_update())); - delayed_view_updater_.setSingleShot(true); - delayed_view_updater_.setInterval(1000 / MaxViewAutoUpdateRate); - /* To let the scroll area fill up the parent QWidget (this), we need a layout */ QHBoxLayout *layout = new QHBoxLayout(this); setLayout(layout); @@ -224,11 +218,13 @@ unordered_set< shared_ptr > View::signals() const void View::clear_signals() { + ViewBase::clear_signalbases(); signals_.clear(); } void View::add_signal(const shared_ptr signal) { + ViewBase::add_signalbase(signal->base()); signals_.insert(signal); } @@ -992,6 +988,7 @@ void View::extents_changed(bool horz, bool vert) sticky_events_ |= (horz ? TraceTreeItemHExtentsChanged : 0) | (vert ? TraceTreeItemVExtentsChanged : 0); + lazy_event_handler_.start(); } @@ -1235,19 +1232,6 @@ void View::capture_state_updated(int state) } } -void View::data_updated() -{ - if (always_zoom_to_fit_ || sticky_scrolling_) { - if (!delayed_view_updater_.isActive()) - delayed_view_updater_.start(); - } else { - determine_time_unit(); - update_scroll(); - ruler_->update(); - viewport_->update(); - } -} - void View::perform_delayed_view_update() { if (always_zoom_to_fit_) {