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::signals_updated()
-{
- for (shared_ptr<RowItem> r : _view) {
- assert(r);
- connect(r.get(), SIGNAL(appearance_changed()),
- this, SLOT(update()));
- }
-}
-
void Viewport::paintEvent(QPaintEvent*)
{
vector< shared_ptr<RowItem> > row_items(_view.begin(), _view.end());
stable_sort(row_items.begin(), row_items.end(),
[](const shared_ptr<RowItem> &a, const shared_ptr<RowItem> &b) {
- return a->v_offset() < b->v_offset(); });
+ return a->visual_v_offset() < b->visual_v_offset(); });
QPainter p(this);
p.setRenderHint(QPainter::Antialiasing);