X-Git-Url: http://git.code-monkey.de/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fview%2Fheader.cpp;h=1977d05340fb0b63db4d87340148edc3baf478c4;hp=bfb75532aa58ad7508db13b1243ce051613e131c;hb=2ad82c2e40b6865481733913a2c32735602f63c4;hpb=adf3aaf490ad6f04f7a92a5bc01581f3075b1e9e diff --git a/pv/view/header.cpp b/pv/view/header.cpp index bfb7553..1977d05 100644 --- a/pv/view/header.cpp +++ b/pv/view/header.cpp @@ -105,18 +105,17 @@ void Header::paintEvent(QPaintEvent*) // would be clipped away. const QRect rect(0, 0, width() - BaselineOffset, height()); - vector< shared_ptr > items( - view_.list_by_type()); + vector< shared_ptr > items( + view_.list_by_type()); stable_sort(items.begin(), items.end(), - [](const shared_ptr &a, const shared_ptr &b) { - return a->visual_v_offset() < b->visual_v_offset(); }); + [](const shared_ptr &a, const shared_ptr &b) { + return a->point(QRect()).y() < b->point(QRect()).y(); }); QPainter painter(this); painter.setRenderHint(QPainter::Antialiasing); - for (const shared_ptr r : items) - { + for (const shared_ptr r : items) { assert(r); const bool highlight = !item_dragging_ &&