nova icon indicating copy to clipboard operation
nova copied to clipboard

Moving green cursor with 's' hotkey does not update start position of annotation

Open chrelli opened this issue 5 years ago • 2 comments

The 'w' hotkey inserts an annotation between the green and red cursor, but only if the green cursor has been places by the mouse. If the green cursor has been moved to a new location by pressing the 's' hotkey, the annotation is still generated between the red cursor and the last position where the green cursor was placed by the mouse. Not where the green cursor is currently displayed.

When the 's' hotkey is pressed, the program should also internally update update the position of the green cursor.

It's a small bug, but it makes it impossible to annotate without using the mouse.

chrelli avatar May 03 '19 17:05 chrelli

It looks like the start and stop times of annotations made by pressing 'w' is pulled here:

        public void NewAnnoKey()
        {
            if (IsDiscreteOrFree)
            {
                double start = MainHandler.Time.TimeFromPixel(MainHandler.Time.CurrentSelectPosition);
                double stop = MainHandler.Time.CurrentPlayPosition;

Instead of pulling the start time from the current select position, it should be pulled from the current position of the green cursor. Then both the start and stop times can be placed using the keyboard.

chrelli avatar May 03 '19 17:05 chrelli

I noticed that the new annotation is made by converting the pixel value of the green cursor into time, which is not stable when the video is played back. If a new annotation is made with 'w' and playback is continued, pressing 's' does not always move the green cursor to the red cursor. Sometimes it chops off a bit of the newly made annotation (splitting) because the pixel is rounded to a different time value.

How about introducing a hotkey, which just does the simple task of setting the CurrentSelectedPosition be equal to the current playback position? It should be very easy to implement and would allow the start and end of annotations to be set w/o using the mouse..

chrelli avatar May 03 '19 20:05 chrelli