From c34df4b81b1c5f49c51a68cd4d8984f75196da30 Mon Sep 17 00:00:00 2001 From: ansstuff Date: Fri, 15 Jun 2012 14:46:33 +0000 Subject: [PATCH] Taseditor: added "rewatch from Selection to Playback" feature for Ctrl+middle click action --- src/drivers/win/taseditor/playback.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/drivers/win/taseditor/playback.cpp b/src/drivers/win/taseditor/playback.cpp index 5e8b0769..6423bdc2 100644 --- a/src/drivers/win/taseditor/playback.cpp +++ b/src/drivers/win/taseditor/playback.cpp @@ -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();