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_panel.cc | |
| parent | 5e640ac3e2f6d5fb079ff65659a1483ddac8672e (diff) | |
Cleanup: use simpler ownership for FilmViewer.
Diffstat (limited to 'src/wx/text_panel.cc')
| -rw-r--r-- | src/wx/text_panel.cc | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/wx/text_panel.cc b/src/wx/text_panel.cc index a9a3f142d..19bac8e8e 100644 --- a/src/wx/text_panel.cc +++ b/src/wx/text_panel.cc @@ -863,10 +863,7 @@ TextPanel::try_to_load_analysis () void TextPanel::update_outline_subtitles_in_viewer () { - auto fv = _parent->film_viewer().lock(); - if (!fv) { - return; - } + auto& fv = _parent->film_viewer(); if (_analysis) { auto rect = _analysis->bounding_box (); @@ -876,9 +873,9 @@ TextPanel::update_outline_subtitles_in_viewer () rect->x += content->text.front()->x_offset() - _analysis->analysis_x_offset(); rect->y += content->text.front()->y_offset() - _analysis->analysis_y_offset(); } - fv->set_outline_subtitles (rect); + fv.set_outline_subtitles(rect); } else { - fv->set_outline_subtitles ({}); + fv.set_outline_subtitles({}); } } |
