Fix mouse event position offset bug.
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.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user