projects
/
pulseview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3cd51b5
)
Header: Hit-test items in reverse order
author
Joel Holdsworth
<joel@airwebreathe.org.uk>
Sun, 6 Sep 2015 14:30:30 +0000
(08:30 -0600)
committer
Joel Holdsworth
<joel@airwebreathe.org.uk>
Sun, 18 Oct 2015 21:32:29 +0000
(15:32 -0600)
pv/view/header.cpp
patch
|
blob
|
history
diff --git
a/pv/view/header.cpp
b/pv/view/header.cpp
index 58c21e596c7ab9ace1beb392a5510b270609dddf..bfb75532aa58ad7508db13b1243ce051613e131c 100644
(file)
--- a/
pv/view/header.cpp
+++ b/
pv/view/header.cpp
@@
-92,9
+92,9
@@
shared_ptr<ViewItem> Header::get_mouse_over_item(const QPoint &pt)
const QRect r(0, 0, width() - BaselineOffset, height());
const vector<shared_ptr<TraceTreeItem>> items(
view_.list_by_type<TraceTreeItem>());
- for (auto
&i : items
)
- if (
i->enabled() && i
->label_rect(r).contains(pt))
- return i;
+ for (auto
i = items.rbegin(); i != items.rend(); i++
)
+ if (
(*i)->enabled() && (*i)
->label_rect(r).contains(pt))
+ return
*
i;
return shared_ptr<TraceTreeItem>();
}