projects
/
pulseview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8914fe7
)
CursorHeader: Hit test time items from front to back
author
Joel Holdsworth
<joel@airwebreathe.org.uk>
Sat, 13 Dec 2014 16:24:26 +0000
(16:24 +0000)
committer
Joel Holdsworth
<joel@airwebreathe.org.uk>
Sun, 28 Dec 2014 18:52:53 +0000
(18:52 +0000)
pv/view/cursorheader.cpp
patch
|
blob
|
history
diff --git
a/pv/view/cursorheader.cpp
b/pv/view/cursorheader.cpp
index 2683e9e6b20c8fc10c9d81f5bfd10dadb14f95fa..fbc6e2e791d53eccf26140896fae83291f607714 100644
(file)
--- a/
pv/view/cursorheader.cpp
+++ b/
pv/view/cursorheader.cpp
@@
-114,9
+114,9
@@
void CursorHeader::mousePressEvent(QMouseEvent *e)
clear_selection();
const vector< shared_ptr<TimeItem> > items(view_.time_items());
- for (auto
&i : items
)
- if (
i && i
->label_rect(rect()).contains(e->pos())) {
- mouse_down_item_ =
i
;
+ for (auto
i = items.rbegin(); i != items.rend(); i++
)
+ if (
(*i)
->label_rect(rect()).contains(e->pos())) {
+ mouse_down_item_ =
(*i)
;
break;
}