projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RowItemOwner: Added list_row_item_owners
[pulseview.git]
/
pv
/
view
/
rowitemowner.cpp
diff --git
a/pv/view/rowitemowner.cpp
b/pv/view/rowitemowner.cpp
index 6f7cbb269663ecb36e9c61dec225051c945a8aea..ba2e1f4838ab44874b831b7ad06d9b79c12dd70c 100644
(file)
--- a/
pv/view/rowitemowner.cpp
+++ b/
pv/view/rowitemowner.cpp
@@
-20,13
+20,14
@@
#include <cassert>
#include <cassert>
-#include "rowitem.h"
-#include "rowitemowner.h"
+#include "rowitem.h
pp
"
+#include "rowitemowner.h
pp
"
using std::max;
using std::make_pair;
using std::min;
using std::pair;
using std::max;
using std::make_pair;
using std::min;
using std::pair;
+using std::set;
using std::shared_ptr;
using std::vector;
using std::shared_ptr;
using std::vector;
@@
-92,9
+93,18
@@
RowItemOwner::const_iterator RowItemOwner::end() const
return const_iterator(this);
}
return const_iterator(this);
}
+set< RowItemOwner* > RowItemOwner::list_row_item_owners()
+{
+ set< RowItemOwner* > owners;
+ for (const auto &r : *this)
+ owners.insert(r->owner());
+ return owners;
+}
+
pair<int, int> RowItemOwner::v_extents() const
{
pair<int, int> RowItemOwner::v_extents() const
{
- pair<int, int> extents(0, 0);
+ pair<int, int> extents(INT_MAX, INT_MIN);
+
for (const shared_ptr<RowItem> r : child_items()) {
assert(r);
if (!r->enabled())
for (const shared_ptr<RowItem> r : child_items()) {
assert(r);
if (!r->enabled())