From: Carl Hetherington Date: Sun, 8 Sep 2019 22:57:03 +0000 (+0100) Subject: Fix timeline selection under scroll. X-Git-Tag: v2.15.19~3 X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=c536ea4b470fffadcc491b2b9885e027efa2ec5c Fix timeline selection under scroll. --- diff --git a/src/wx/timeline.cc b/src/wx/timeline.cc index cac9318cc..daeeb0a51 100644 --- a/src/wx/timeline.cc +++ b/src/wx/timeline.cc @@ -478,7 +478,11 @@ Timeline::event_to_view (wxMouseEvent& ev) { /* Search backwards through views so that we find the uppermost one first */ TimelineViewList::reverse_iterator i = _views.rbegin(); - Position const p (ev.GetX(), ev.GetY()); + + int vsx, vsy; + _main_canvas->GetViewStart (&vsx, &vsy); + Position const p (ev.GetX() + vsx * _x_scroll_rate, ev.GetY() + vsy * _y_scroll_rate); + while (i != _views.rend() && !(*i)->bbox().contains (p)) { shared_ptr cv = dynamic_pointer_cast (*i); ++i;