From d2664bbfbd09f04b25f94fefbf1ac890edbb4486 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sat, 29 Sep 2018 22:46:35 +0200 Subject: [PATCH] Make it impossible to queue unfinished clips. --- mainwindow.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 1b7a71f..fd94e89 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -145,7 +145,10 @@ void MainWindow::queue_clicked() if (!selected->hasSelection()) { Clip clip = *cliplist_clips->back(); clip.stream_idx = 0; - playlist_clips->add_clip(clip); + if (clip.pts_out != -1) { + playlist_clips->add_clip(clip); + playlist_selection_changed(); + } return; } @@ -158,8 +161,10 @@ void MainWindow::queue_clicked() clip.stream_idx = ui->preview_display->get_stream_idx(); } - playlist_clips->add_clip(clip); - playlist_selection_changed(); + if (clip.pts_out != -1) { + playlist_clips->add_clip(clip); + playlist_selection_changed(); + } } void MainWindow::preview_clicked() -- 2.39.2