diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-07-28 22:20:19 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-07-28 22:20:19 +0200 |
| commit | d902160e3c89a9f65f58a2463fac0b1de1d940b1 (patch) | |
| tree | c1071f5b3f1046dda4820b4991331b21230fcaa6 /src/wx/closed_captions_dialog.cc | |
| parent | e83e799c027346681208c57181b28010d01c9b6e (diff) | |
Fix various problems with the closed caption viewer not being updated properly.v2.15.91
Diffstat (limited to 'src/wx/closed_captions_dialog.cc')
| -rw-r--r-- | src/wx/closed_captions_dialog.cc | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/wx/closed_captions_dialog.cc b/src/wx/closed_captions_dialog.cc index afcf5fa87..625652b8c 100644 --- a/src/wx/closed_captions_dialog.cc +++ b/src/wx/closed_captions_dialog.cc @@ -205,6 +205,12 @@ ClosedCaptionsDialog::update () Refresh (); _current_in_lines = true; } + + if (!_current && _tracks.empty()) { + for (int i = 0; i < CLOSED_CAPTION_LINES; ++i) { + _lines[i] = wxString(); + } + } } void @@ -215,8 +221,15 @@ ClosedCaptionsDialog::clear () Refresh (); } + +void +ClosedCaptionsDialog::set_butler (weak_ptr<Butler> butler) +{ + _butler = butler; +} + void -ClosedCaptionsDialog::set_film_and_butler (shared_ptr<Film> film, weak_ptr<Butler> butler) +ClosedCaptionsDialog::update_tracks (shared_ptr<const Film> film) { _tracks.clear (); @@ -239,5 +252,5 @@ ClosedCaptionsDialog::set_film_and_butler (shared_ptr<Film> film, weak_ptr<Butle _track->SetSelection (0); } - _butler = butler; + track_selected (); } |
