From: Joel Holdsworth Date: Sat, 22 Aug 2015 21:54:00 +0000 (-0600) Subject: View: Moved in list_row_item_owners X-Git-Tag: pulseview-0.3.0~91 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=4800cf9a4b346ec4553234aa1a3e10bf783bf965;p=pulseview.git View: Moved in list_row_item_owners --- diff --git a/pv/view/tracetreeitemowner.cpp b/pv/view/tracetreeitemowner.cpp index a33a8597..93b966b4 100644 --- a/pv/view/tracetreeitemowner.cpp +++ b/pv/view/tracetreeitemowner.cpp @@ -95,14 +95,6 @@ TraceTreeItemOwner::const_iterator TraceTreeItemOwner::end() const return const_iterator(this); } -set< TraceTreeItemOwner* > TraceTreeItemOwner::list_row_item_owners() -{ - set< TraceTreeItemOwner* > owners; - for (const auto &r : *this) - owners.insert(r->owner()); - return owners; -} - pair TraceTreeItemOwner::v_extents() const { pair extents(INT_MAX, INT_MIN); diff --git a/pv/view/tracetreeitemowner.hpp b/pv/view/tracetreeitemowner.hpp index c1776995..b26b1e7e 100644 --- a/pv/view/tracetreeitemowner.hpp +++ b/pv/view/tracetreeitemowner.hpp @@ -118,12 +118,6 @@ public: */ const_iterator end() const; - /** - * Makes a list of row item owners of all the row items that are - * decendants of this item. - */ - std::set< TraceTreeItemOwner* > list_row_item_owners(); - /** * Creates a list of decendant signals filtered by type. */ diff --git a/pv/view/view.cpp b/pv/view/view.cpp index 3f0fe9d1..4b17a56f 100644 --- a/pv/view/view.cpp +++ b/pv/view/view.cpp @@ -507,7 +507,9 @@ void View::update_viewport() void View::restack_all_trace_tree_items() { // Make a list of owners that is sorted from deepest first - const auto owners = list_row_item_owners(); + set< TraceTreeItemOwner* > owners; + for (const auto &r : *this) + owners.insert(r->owner()); vector< TraceTreeItemOwner* > sorted_owners(owners.begin(), owners.end()); sort(sorted_owners.begin(), sorted_owners.end(), [](const TraceTreeItemOwner* a, const TraceTreeItemOwner *b) {