]> git.sesse.net Git - nageru/blobdiff - futatabi/mainwindow.cpp
Fix an issue where the stop button would get grayed out if restarting playing.
[nageru] / futatabi / mainwindow.cpp
index 025f00ba27186437c1a2a2ed2999e5a219d1fa90..d73f579a9e6faee5880c6ac2447004a1df6cc99c 100644 (file)
@@ -431,6 +431,14 @@ void MainWindow::defer_timer_expired()
 
 void MainWindow::content_changed()
 {
+       // If we are playing, update the part of the playlist that's not playing yet.
+       vector<ClipWithID> clips;
+       for (unsigned row = 0; row < playlist_clips->size(); ++row) {
+               clips.emplace_back(*playlist_clips->clip_with_id(row));
+       }
+       live_player->splice_play(clips);
+
+       // Serialize the state.
        if (defer_timeout->isActive() &&
            (!currently_deferring_model_changes || deferred_change_id != current_change_id)) {
                // There's some deferred event waiting, but this event is unrelated.
@@ -506,6 +514,7 @@ void MainWindow::stop_clicked()
        fake_clip.pts_out = 0;
        playlist_clips->set_progress({});
        live_player->play(fake_clip);
+       ui->stop_btn->setEnabled(false);
 }
 
 void MainWindow::live_player_done()