Skip to content

Commit

Permalink
Keyboard shortcut for "Goto Next/Previous frames" (#512)
Browse files Browse the repository at this point in the history
* Fixed "Go to Next/Previous Frame" text name in Dropdown menu.

*  Added "Go to Next/Previous Frame" and Motified "Go to Next/Previous Keyframe" actions with keyboard.

* Motified default keyboard shortcut.

I think this would be more straightforward for users.
  • Loading branch information
puetsua authored and chchwy committed Jun 13, 2016
1 parent 906f20c commit af13803
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
4 changes: 4 additions & 0 deletions app/actioncommands.cpp
Expand Up @@ -142,18 +142,22 @@ void ActionCommands::PlayStop()

void ActionCommands::GotoNextFrame()
{
mEditor->scrubForward();
}

void ActionCommands::GotoPrevFrame()
{
mEditor->scrubBackward();
}

void ActionCommands::GotoNextKeyFrame()
{
mEditor->scrubNextKeyFrame();
}

void ActionCommands::GotoPrevKeyFrame()
{
mEditor->scrubPreviousKeyFrame();
}

Status ActionCommands::addNewBitmapLayer()
Expand Down
8 changes: 4 additions & 4 deletions app/mainwindow2.cpp
Expand Up @@ -292,10 +292,10 @@ void MainWindow2::createMenus()

connect(ui->actionAdd_Frame, &QAction::triggered, mEditor, &Editor::addNewKey );
connect(ui->actionRemove_Frame, &QAction::triggered, mEditor, &Editor::removeKey );
//connect(ui->actionNext_Frame, &QAction::triggered, m_pEditor, &Editor::playNextFrame );
//connect(ui->actionPrevious_Frame, &QAction::triggered, m_pEditor, &Editor::playPrevFrame );
connect(ui->actionNext_KeyFrame, &QAction::triggered, mEditor, &Editor::scrubNextKeyFrame );
connect(ui->actionPrev_KeyFrame, &QAction::triggered, mEditor, &Editor::scrubPreviousKeyFrame );
connect(ui->actionNext_Frame, &QAction::triggered, mCommands, &ActionCommands::GotoNextFrame );
connect(ui->actionPrevious_Frame, &QAction::triggered, mCommands, &ActionCommands::GotoPrevFrame );
connect(ui->actionNext_KeyFrame, &QAction::triggered, mCommands, &ActionCommands::GotoNextKeyFrame );
connect(ui->actionPrev_KeyFrame, &QAction::triggered, mCommands, &ActionCommands::GotoPrevKeyFrame );
connect(ui->actionDuplicate_Frame, &QAction::triggered, mEditor, &Editor::duplicateKey );
connect(ui->actionMove_Frame_Forward, &QAction::triggered, mEditor, &Editor::moveFrameForward ); //HERE
connect(ui->actionMove_Frame_Backward, &QAction::triggered, mEditor, &Editor::moveFrameBackward );
Expand Down
6 changes: 3 additions & 3 deletions app/ui/mainwindow2.ui
Expand Up @@ -785,7 +785,7 @@ background: #B6DBEA;
</iconset>
</property>
<property name="text">
<string>Next_KeyFrame</string>
<string>Next KeyFrame</string>
</property>
<property name="toolTip">
<string>Next KeyFrame</string>
Expand All @@ -798,7 +798,7 @@ background: #B6DBEA;
</iconset>
</property>
<property name="text">
<string>Prev_KeyFrame</string>
<string>Previous KeyFrame</string>
</property>
<property name="toolTip">
<string>Previous KeyFrame</string>
Expand All @@ -812,7 +812,7 @@ background: #B6DBEA;
<bool>true</bool>
</property>
<property name="text">
<string>MultiLayerOnionSkin</string>
<string>MultiLayer Onion Skin</string>
</property>
</action>
<action name="actionLoopControl">
Expand Down
8 changes: 4 additions & 4 deletions resources/kb.ini
Expand Up @@ -38,10 +38,10 @@ CmdOnionSkinPrevious=O
CmdOnionSkinNext=Alt+O
CmdPlay=Return
CmdLoop=Ctrl+L
CmdGotoNextFrame=
CmdGotoPreviousFrame=
CmdGotoNextKeyFrame=.
CmdGotoPreviousKeyFrame=","
CmdGotoNextFrame=.
CmdGotoPreviousFrame=","
CmdGotoNextKeyFrame=Alt+.
CmdGotoPreviousKeyFrame=Alt+","
CmdMoveFrameForward=Ctrl+.
CmdMoveFrameBackward=ctrl+","
CmdAddFrame=F7
Expand Down

0 comments on commit af13803

Please sign in to comment.