]> git.sesse.net Git - nageru/commitdiff
Show preview display when using cue in or cue out, not just on scrubbing.
authorSteinar H. Gunderson <steinar+nageru@gunderson.no>
Wed, 30 Oct 2019 19:01:46 +0000 (20:01 +0100)
committerSteinar H. Gunderson <steinar+nageru@gunderson.no>
Wed, 30 Oct 2019 19:01:46 +0000 (20:01 +0100)
futatabi/mainwindow.cpp

index a479a7389b41bc800fd6fc9696053ecdd66f74ad..9885232eb1f4ea3e60d244ef0c4d1272151e00cb 100644 (file)
@@ -388,6 +388,10 @@ void MainWindow::cue_in_clicked()
                playlist_selection_changed();
        }
 
+       // Show the clip in the preview.
+       unsigned stream_idx = ui->preview_display->get_stream_idx();
+       preview_single_frame(cliplist_clips->mutable_back()->pts_in, stream_idx, FIRST_AT_OR_AFTER);
+
        // Select the item so that we can jog it.
        ui->clip_list->setFocus();
        QModelIndex index = cliplist_clips->index(cliplist_clips->size() - 1, int(ClipList::Column::IN));
@@ -404,6 +408,10 @@ void MainWindow::cue_out_clicked()
 
        cliplist_clips->mutable_back()->pts_out = current_pts + lrint(global_flags.cue_out_point_padding_seconds * TIMEBASE);
 
+       // Show the clip in the preview. (TODO: This won't take padding into account.)
+       unsigned stream_idx = ui->preview_display->get_stream_idx();
+       preview_single_frame(cliplist_clips->mutable_back()->pts_out, stream_idx, LAST_BEFORE);
+
        // Select the item so that we can jog it.
        ui->clip_list->setFocus();
        QModelIndex index = cliplist_clips->index(cliplist_clips->size() - 1, int(ClipList::Column::OUT));