From e38ce84e7e2ce3c468fa60ab7c23afc0000e98de Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 13 Nov 2020 17:37:08 +0100 Subject: [PATCH] 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. --- src/wx/text_view.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } -- 2.30.2