X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fswaroop_controls.cc;h=870ac518bb1d6dc13d6d30b04c63aced19e2597e;hb=f37b8122a04c6a7f8a86c77de44ac995b9555d1a;hp=176efc4438ab9735b7471abd5ca1639545ddd6df;hpb=8ae2dcecc765df1a98a5dc686473ac46f5e08c3e;p=dcpomatic.git diff --git a/src/wx/swaroop_controls.cc b/src/wx/swaroop_controls.cc index 176efc443..870ac518b 100644 --- a/src/wx/swaroop_controls.cc +++ b/src/wx/swaroop_controls.cc @@ -136,6 +136,7 @@ SwaroopControls::check_restart () _selected_playlist_position = index; update_current_content (); _viewer->seek (DCPTime(time), false); + _viewer->start (); } } @@ -207,6 +208,10 @@ SwaroopControls::stop_clicked () { _viewer->stop (); _viewer->seek (DCPTime(), true); + if (_selected_playlist) { + _selected_playlist_position = 0; + update_current_content (); + } } bool @@ -305,7 +310,7 @@ SwaroopControls::update_playlist_directory () } sort (_playlists.begin(), _playlists.end(), SPLComparator()); - for (SPL i: _playlists) { + BOOST_FOREACH (SPL i, _playlists) { add_playlist_to_list (i); } @@ -334,6 +339,9 @@ SwaroopControls::spl_selection_changed () return; } + wxProgressDialog dialog (_("DCP-o-matic"), "Loading playlist"); + dialog.Pulse (); + _current_spl_view->DeleteAllItems (); int N = 0; @@ -348,7 +356,9 @@ SwaroopControls::spl_selection_changed () _selected_playlist = selected; _selected_playlist_position = 0; + dialog.Pulse (); reset_film (); + dialog.Pulse (); update_current_content (); } @@ -385,17 +395,15 @@ SwaroopControls::update_current_content () { DCPOMATIC_ASSERT (_selected_playlist); - bool const was_playing = _viewer->stop (); + wxProgressDialog dialog (_("DCP-o-matic"), "Loading content"); SPLEntry const & e = _playlists[*_selected_playlist].get()[_selected_playlist_position]; _current_disable_timeline = e.disable_timeline; _current_disable_next = !e.skippable; setup_sensitivity (); + dialog.Pulse (); reset_film (); - if (was_playing) { - _viewer->start (); - } } void @@ -405,5 +413,15 @@ SwaroopControls::viewer_finished () return; } - next_clicked (); + bool const stop = _playlists[*_selected_playlist].get()[_selected_playlist_position].stop_after_play; + + _selected_playlist_position++; + if (_selected_playlist_position < int(_playlists[*_selected_playlist].get().size())) { + update_current_content (); + if (!stop) { + _viewer->start (); + } + } else { + ResetFilm (shared_ptr(new Film(optional()))); + } }