Skip to content

Commit

Permalink
CursorHeader: Hit test time items from front to back
Browse files Browse the repository at this point in the history
  • Loading branch information
jhol committed Dec 13, 2014
1 parent 628bd46 commit 3c9d6d4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pv/view/cursorheader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 3c9d6d4

Please sign in to comment.