projects
/
pulseview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
364d215
)
Header: Use list_by_type in on_ungroup
author
Joel Holdsworth
<joel@airwebreathe.org.uk>
Sun, 16 Aug 2015 15:22:08 +0000
(09:22 -0600)
committer
Joel Holdsworth
<joel@airwebreathe.org.uk>
Sun, 18 Oct 2015 21:32:28 +0000
(15:32 -0600)
pv/view/header.cpp
patch
|
blob
|
history
diff --git
a/pv/view/header.cpp
b/pv/view/header.cpp
index 60d64b2f401f2483aad1226dc00e66d62ca54191..be4cebcb26f40b4e23ffe337ebe211a1c745da97 100644
(file)
--- a/
pv/view/header.cpp
+++ b/
pv/view/header.cpp
@@
-198,15
+198,14
@@
void Header::on_ungroup()
bool restart;
do {
restart = false;
- for (const shared_ptr<TraceTreeItem> r : view_) {
- const shared_ptr<TraceGroup> tg =
- dynamic_pointer_cast<TraceGroup>(r);
- if (tg
&& tg
->selected()) {
+ const vector< shared_ptr<TraceGroup> > groups(
+ view_.list_by_type<TraceGroup>());
+ for (const shared_ptr<TraceGroup> tg : groups)
+ if (tg->selected()) {
tg->ungroup();
restart = true;
break;
}
- }
} while (restart);
}