Skip to content

Commit

Permalink
fix Player > Next / Previous Frame regression
Browse files Browse the repository at this point in the history
  • Loading branch information
ddennedy committed Dec 12, 2024
1 parent b04b181 commit 74fddd3
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -583,26 +583,32 @@ void Player::setupActions()
action = new QAction(tr("Seek End"), this);
action->setShortcut(QKeySequence(Qt::Key_End));
connect(action, &QAction::triggered, this, [&]() {
if (MLT.producer())
if (MLT.producer()) {
pause(MLT.producer()->get_length());
seek(MLT.producer()->get_length());
}
});
Actions.add("playerSeekEndAction", action);

action = new QAction(tr("Next Frame"), this);
action->setProperty(Actions.hardKeyProperty, "K+L");
action->setShortcut(QKeySequence(Qt::Key_Right));
connect(action, &QAction::triggered, this, [&]() {
if (MLT.producer())
if (MLT.producer()) {
pause(position() + 1);
seek(position() + 1);
}
});
Actions.add("playerNextFrameAction", action);

action = new QAction(tr("Previous Frame"), this);
action->setProperty(Actions.hardKeyProperty, "K+J");
action->setShortcut(QKeySequence(Qt::Key_Left));
connect(action, &QAction::triggered, this, [&]() {
if (MLT.producer())
if (MLT.producer()) {
pause(position() - 1);
seek(position() - 1);
}
});
Actions.add("playerPreviousFrameAction", action);

Expand Down

0 comments on commit 74fddd3

Please sign in to comment.