diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-10-12 01:03:28 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-10-14 11:41:18 +0200 |
| commit | 449f383f13e5755c523db11f9adef53b58391025 (patch) | |
| tree | 7751c6ede10455de02aa85dcd00d17109c9d57a6 /src/wx/text_view.cc | |
| parent | 5e640ac3e2f6d5fb079ff65659a1483ddac8672e (diff) | |
Cleanup: use simpler ownership for FilmViewer.
Diffstat (limited to 'src/wx/text_view.cc')
| -rw-r--r-- | src/wx/text_view.cc | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/wx/text_view.cc b/src/wx/text_view.cc index 4a39b9139..7e5267886 100644 --- a/src/wx/text_view.cc +++ b/src/wx/text_view.cc @@ -35,7 +35,6 @@ using std::dynamic_pointer_cast; using std::list; using std::shared_ptr; -using std::weak_ptr; using boost::bind; using namespace dcpomatic; #if BOOST_VERSION >= 106100 @@ -44,7 +43,7 @@ using namespace boost::placeholders; TextView::TextView ( - wxWindow* parent, shared_ptr<Film> film, shared_ptr<Content> content, shared_ptr<TextContent> text, shared_ptr<Decoder> decoder, weak_ptr<FilmViewer> viewer + wxWindow* parent, shared_ptr<Film> film, shared_ptr<Content> content, shared_ptr<TextContent> text, shared_ptr<Decoder> decoder, FilmViewer& viewer ) : wxDialog (parent, wxID_ANY, _("Captions"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) , _content (content) @@ -148,8 +147,6 @@ TextView::subtitle_selected (wxListEvent& ev) DCPOMATIC_ASSERT (ev.GetIndex() < int(_start_times.size())); auto lc = _content.lock (); DCPOMATIC_ASSERT (lc); - auto fv = _film_viewer.lock (); - DCPOMATIC_ASSERT (fv); /* 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); + _film_viewer.seek(lc, _start_times[ev.GetIndex()] + ContentTime::from_frames(1, _frc->source), true); } |
