Skip to content

Commit

Permalink
Fix mouse event position offset bug.
Browse files Browse the repository at this point in the history
Search scroll groups for event delivery from top to bottom rather than bottom
to top.  Overlapping scroll groups still aren't properly supported by the
canvas, but currently all we care about is that the top one gets the event, so
the hscroll group (tempo lines) can be below the hvscroll group (tracks), but
the latter gets events.
  • Loading branch information
drobilla committed Jan 12, 2015
1 parent e79af77 commit 55278fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libs/canvas/canvas.cc
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ Canvas::window_to_canvas (Duple const & d) const
in_window.y = 0;
}

for (std::list<Item*>::const_iterator i = root_children.begin(); i != root_children.end(); ++i) {
for (std::list<Item*>::const_reverse_iterator i = root_children.rbegin(); i != root_children.rend(); ++i) {
if (((sg = dynamic_cast<ScrollGroup*>(*i)) != 0) && sg->covers_window (in_window)) {
break;
}
Expand Down

0 comments on commit 55278fb

Please sign in to comment.