Taseditor: added "rewatch from Selection to Playback" feature for Ctrl+middle click action

This commit is contained in:
ansstuff 2012-06-15 14:46:33 +00:00
parent ea47e532ec
commit c34df4b81b
1 changed files with 10 additions and 1 deletions

View File

@ -296,10 +296,19 @@ void PLAYBACK::MiddleButtonClick()
SeekingStart(target_frame + 1);
} else if (GetAsyncKeyState(VK_CONTROL) < 0)
{
// if Ctrl is held, seek to Selection cursor
// if Ctrl is held, seek to Selection cursor or replay from Selection cursor
int selection_beginning = selection.GetCurrentSelectionBeginning();
if (selection_beginning > currFrameCounter)
{
SeekingStart(selection_beginning + 1);
} else if (selection_beginning < currFrameCounter)
{
int saved_currFrameCounter = currFrameCounter;
if (selection_beginning < 0)
selection_beginning = 0;
jump(selection_beginning);
SeekingStart(saved_currFrameCounter + 1);
}
} else if (lost_position_frame > currFrameCounter + 1)
{
RestorePosition();