projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
926b27d
)
Fix timeline selection under scroll.
author
Carl Hetherington
<cth@carlh.net>
Sun, 8 Sep 2019 22:57:03 +0000
(23:57 +0100)
committer
Carl Hetherington
<cth@carlh.net>
Sun, 8 Sep 2019 22:57:03 +0000
(23:57 +0100)
src/wx/timeline.cc
patch
|
blob
|
history
diff --git
a/src/wx/timeline.cc
b/src/wx/timeline.cc
index cac9318cca2eac486aee8ce30cb40c87f08a872f..daeeb0a51280916c4bb5b594c59fe86f6627c201 100644
(file)
--- 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<int> const p (ev.GetX(), ev.GetY());
+
+ int vsx, vsy;
+ _main_canvas->GetViewStart (&vsx, &vsy);
+ Position<int> const p (ev.GetX() + vsx * _x_scroll_rate, ev.GetY() + vsy * _y_scroll_rate);
+
while (i != _views.rend() && !(*i)->bbox().contains (p)) {
shared_ptr<TimelineContentView> cv = dynamic_pointer_cast<TimelineContentView> (*i);
++i;