swaroop: unload film when playlist ends.
authorCarl Hetherington <cth@carlh.net>
Tue, 18 Dec 2018 22:36:19 +0000 (22:36 +0000)
committerCarl Hetherington <cth@carlh.net>
Tue, 18 Dec 2018 22:36:19 +0000 (22:36 +0000)
src/wx/swaroop_controls.cc

index 176efc4438ab9735b7471abd5ca1639545ddd6df..292898b164b291aff70b6f3d4c962ec9a2248c3f 100644 (file)
@@ -405,5 +405,10 @@ SwaroopControls::viewer_finished ()
                return;
        }
 
-       next_clicked ();
+       _selected_playlist_position++;
+       if (_selected_playlist_position < int(_playlists[*_selected_playlist].get().size())) {
+               update_current_content ();
+       } else {
+               ResetFilm (shared_ptr<Film>(new Film(optional<boost::filesystem::path>())));
+       }
 }