X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=futatabi%2Fmainwindow.cpp;h=f55ad0e489083572e9d86fa80e0dd2f8c749d656;hb=ea502b76e42b700e73afb25522a0b947e9ee60a9;hp=9bea809b8c63dc2ebe0ac840e9900a313402cd09;hpb=f78363119d05e83b2665d89b147945fc0cdec020;p=nageru diff --git a/futatabi/mainwindow.cpp b/futatabi/mainwindow.cpp index 9bea809..f55ad0e 100644 --- a/futatabi/mainwindow.cpp +++ b/futatabi/mainwindow.cpp @@ -289,7 +289,7 @@ MainWindow::MainWindow() if (!load_midi_mapping_from_file(global_flags.midi_mapping_filename, &midi_mapping)) { fprintf(stderr, "Couldn't load MIDI mapping '%s'; exiting.\n", global_flags.midi_mapping_filename.c_str()); - exit(1); + abort(); } midi_mapper.set_midi_mapping(midi_mapping); } @@ -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)); @@ -844,6 +852,11 @@ bool MainWindow::eventFilter(QObject *watched, QEvent *event) if (mouse->modifiers() & Qt::KeyboardModifier::ShiftModifier) { scrub_sensitivity *= 10; wheel_sensitivity *= 10; + if (mouse->modifiers() & Qt::KeyboardModifier::ControlModifier) { + // Ctrl+Shift is a super-modifier, meant only for things like “go back two hours”. + scrub_sensitivity *= 100; + wheel_sensitivity *= 100; + } } if (mouse->modifiers() & Qt::KeyboardModifier::AltModifier) { // Note: Shift + Alt cancel each other out. scrub_sensitivity /= 10; @@ -899,6 +912,11 @@ bool MainWindow::eventFilter(QObject *watched, QEvent *event) if (wheel->modifiers() & Qt::KeyboardModifier::ShiftModifier) { scrub_sensitivity *= 10; wheel_sensitivity *= 10; + if (wheel->modifiers() & Qt::KeyboardModifier::ControlModifier) { + // Ctrl+Shift is a super-modifier, meant only for things like “go back two hours”. + scrub_sensitivity *= 100; + wheel_sensitivity *= 100; + } } if (wheel->modifiers() & Qt::KeyboardModifier::AltModifier) { // Note: Shift + Alt cancel each other out. scrub_sensitivity /= 10;