From: Steinar H. Gunderson Date: Wed, 30 Oct 2019 19:01:46 +0000 (+0100) Subject: Show preview display when using cue in or cue out, not just on scrubbing. X-Git-Tag: 1.9.1~4 X-Git-Url: https://git.sesse.net/?p=nageru;a=commitdiff_plain;h=8d5aa7ff82e1374b625a9ec23d39326a6f4baf67 Show preview display when using cue in or cue out, not just on scrubbing. --- diff --git a/futatabi/mainwindow.cpp b/futatabi/mainwindow.cpp index a479a73..9885232 100644 --- a/futatabi/mainwindow.cpp +++ b/futatabi/mainwindow.cpp @@ -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));