X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Ffilm_viewer.cc;h=9b648a8b970ed28c3fb031a72e70d9b18d8ef237;hb=a978f3ac575f1af017002c861480d5203cf0a34e;hp=1badc0282fc2258edb1c77f22867147e96fefc74;hpb=17d4990d0fca0f38268441a73c73d9e340b4bc85;p=dcpomatic.git diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc index 1badc0282..9b648a8b9 100644 --- a/src/wx/film_viewer.cc +++ b/src/wx/film_viewer.cc @@ -155,7 +155,7 @@ FilmViewer::set_film (shared_ptr film) _player_connection = _player->Changed.connect (boost::bind (&FilmViewer::player_changed, this, _1)); calculate_sizes (); - get (_position, _last_get_accurate); + refresh (); setup_sensitivity (); } @@ -184,6 +184,7 @@ FilmViewer::get (DCPTime p, bool accurate) if (!pvf.empty ()) { try { _frame = pvf.front()->image (PIX_FMT_RGB24, boost::bind (&Log::dcp_log, _film->log().get(), _1, _2)); + ImageChanged (pvf.front ()); dcp::YUVToRGB yuv_to_rgb = dcp::YUV_TO_RGB_REC601; if (pvf.front()->colour_conversion()) { @@ -295,7 +296,7 @@ FilmViewer::panel_sized (wxSizeEvent& ev) _panel_size.height = ev.GetSize().GetHeight(); calculate_sizes (); - get (_position, _last_get_accurate); + refresh (); update_position_label (); update_position_slider (); } @@ -436,7 +437,7 @@ FilmViewer::player_changed (bool frequent) } calculate_sizes (); - get (_position, _last_get_accurate); + refresh (); update_position_label (); update_position_slider (); } @@ -462,3 +463,10 @@ FilmViewer::film_changed (Film::Property p) setup_sensitivity (); } } + +/** Re-get the current frame */ +void +FilmViewer::refresh () +{ + get (_position, _last_get_accurate); +}