From: Carl Hetherington Date: Fri, 13 Nov 2020 16:37:08 +0000 (+0100) Subject: Fix finding of subtitles when clicking in the list view. X-Git-Tag: v2.15.108~67 X-Git-Url: https://git.carlh.net/gitweb/?a=commitdiff_plain;ds=sidebyside;h=e38ce84e7e2ce3c468fa60ab7c23afc0000e98de;p=dcpomatic.git Fix finding of subtitles when clicking in the list view. I didn't look into this as deeply as I probably should have, but it seems there's some rounding error which means we don't always hit the subtitle's frame unless we add one on. --- diff --git a/src/wx/text_view.cc b/src/wx/text_view.cc index 66c144628..491df7b3b 100644 --- a/src/wx/text_view.cc +++ b/src/wx/text_view.cc @@ -144,5 +144,6 @@ TextView::subtitle_selected (wxListEvent& ev) DCPOMATIC_ASSERT (lc); shared_ptr fv = _film_viewer.lock (); DCPOMATIC_ASSERT (fv); - fv->seek (lc, _start_times[ev.GetIndex()], true); + /* Add on a frame here to work around any rounding errors and make sure land in the subtitle */ + fv->seek (lc, _start_times[ev.GetIndex()] + ContentTime::from_frames(1, _frc->source), true); }