X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fview%2Ftracegroup.cpp;h=140b85187efef4f2309837db938db75a6de82dce;hp=87f1ff3dcab20fac2c065a5daadb0525534e56f8;hb=a8743cd962b2d18082c6ddaeb554d56013919d95;hpb=af503b104d890a357c736c678bb00296d889c090 diff --git a/pv/view/tracegroup.cpp b/pv/view/tracegroup.cpp index 87f1ff3d..140b8518 100644 --- a/pv/view/tracegroup.cpp +++ b/pv/view/tracegroup.cpp @@ -49,7 +49,7 @@ TraceGroup::~TraceGroup() bool TraceGroup::enabled() const { return std::any_of(child_items().begin(), child_items().end(), - [](const shared_ptr &r) { return r->enabled(); }); + [](const shared_ptr &r) { return r->enabled(); }); } pv::Session& TraceGroup::session() @@ -115,7 +115,7 @@ void TraceGroup::paint_label(QPainter &p, const QRect &rect, bool hover) QRectF TraceGroup::label_rect(const QRectF &rect) const { QRectF child_rect; - for (const shared_ptr r : child_items()) + for (const shared_ptr r : child_items()) if (r && r->enabled()) child_rect = child_rect.united(r->label_rect(rect)); @@ -157,8 +157,7 @@ int TraceGroup::owner_visual_v_offset() const void TraceGroup::restack_items() { - vector< shared_ptr > items( - child_items().begin(), child_items().end()); + vector> items(trace_tree_child_items()); // Sort by the centre line of the extents stable_sort(items.begin(), items.end(), @@ -197,8 +196,7 @@ unsigned int TraceGroup::depth() const void TraceGroup::ungroup() { - const vector< shared_ptr > items( - child_items().begin(), child_items().end()); + const vector> items(trace_tree_child_items()); clear_child_items(); for (shared_ptr r : items)