summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-07-01 15:17:11 +0100
committerCarl Hetherington <cth@carlh.net>2019-07-01 15:17:11 +0100
commit106bde1d2c9246fc62c8f37f560701abf0e80c51 (patch)
tree881c22879465f0a135c44b8229b3cfff7cf2ec95
parent63c1bbc1ba177600523b2257223070cc2dbde7b7 (diff)
swaroop: fix decrementing of allowed shows count to be at the right time.
-rw-r--r--src/wx/swaroop_controls.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/wx/swaroop_controls.cc b/src/wx/swaroop_controls.cc
index 99b1fd064..925fcb5e7 100644
--- a/src/wx/swaroop_controls.cc
+++ b/src/wx/swaroop_controls.cc
@@ -567,6 +567,7 @@ SwaroopControls::update_current_content ()
reset_film ();
}
+/** One piece of content in our SPL has finished playing */
void
SwaroopControls::viewer_finished ()
{
@@ -578,16 +579,17 @@ SwaroopControls::viewer_finished ()
_selected_playlist_position++;
if (_selected_playlist_position < int(_playlists[*_selected_playlist].get().size())) {
+ /* Next piece of content on the SPL */
update_current_content ();
if (!stop) {
_viewer->start ();
}
} else {
+ /* Finished the whole SPL */
_selected_playlist_position = 0;
_viewer->set_background_image (true);
ResetFilm (shared_ptr<Film>(new Film(optional<boost::filesystem::path>())));
stopped ();
+ decrement_allowed_shows ();
}
-
- decrement_allowed_shows ();
}