X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fview%2Fviewport.cpp;h=eeca690da0e45cb4efb96bbfc619082ab9d6234b;hb=448a72cf7f0225eace2335ec05b979c4e9a6b882;hp=221714051504a81a7e48b47056217d98f67e05cb;hpb=6dcdb3258f6f0b25e69154b5919405a194b7e724;p=pulseview.git diff --git a/pv/view/viewport.cpp b/pv/view/viewport.cpp index 22171405..eeca690d 100644 --- a/pv/view/viewport.cpp +++ b/pv/view/viewport.cpp @@ -52,27 +52,16 @@ Viewport::Viewport(View &parent) : setAutoFillBackground(true); setBackgroundRole(QPalette::Base); - connect(&_view.session(), SIGNAL(signals_changed()), - this, SLOT(on_signals_changed())); - connect(&_view, SIGNAL(signals_moved()), this, SLOT(on_signals_moved())); } -int Viewport::get_total_height() const -{ - int h = 0; - for (auto &i : _view) - h = max(i->v_offset() + View::SignalHeight, h); - return h; -} - void Viewport::paintEvent(QPaintEvent*) { vector< shared_ptr > row_items(_view.begin(), _view.end()); stable_sort(row_items.begin(), row_items.end(), [](const shared_ptr &a, const shared_ptr &b) { - return a->v_offset() < b->v_offset(); }); + return a->visual_v_offset() < b->visual_v_offset(); }); QPainter p(this); p.setRenderHint(QPainter::Antialiasing); @@ -225,15 +214,6 @@ bool Viewport::touchEvent(QTouchEvent *event) return true; } -void Viewport::on_signals_changed() -{ - for (shared_ptr r : _view) { - assert(r); - connect(r.get(), SIGNAL(appearance_changed()), - this, SLOT(update())); - } -} - void Viewport::on_signals_moved() { update();