Skip to content

Conversation

@elyasbny
Copy link

Description

With the current UI, it is possible to use the "previous frame" or "next frame" buttons of the Sequence Player to select negative frame numbers or frame numbers that are larger than the actual number of frames in the sequence.

Selecting an invalid frame number has no functional impact on the Sequence Player (it is not allowed on QtAliceVision's side) but it is still a glitch from a user standpoint.

When typing in a negative frame number, said number is immediately replaced by "0" (as it should). However, when typing in a frame number that is larger than the number of frames, no such check is performed.

We would like to disable the "previous frame" buttons when the selected frame ID is 0, since it makes no sense to go lower than that; conversely, we would like to disable the "next frame" buttons when the selected frame ID corresponds to the last frame.

The buttons should correctly be re-enabled when going in the opposite direction.

Implementation remarks

For the buttons, we take no action if we push the previous button when we are on the first frame (same for when we are on the last frame) and for typing, we apply min and max functions to force the entered number to be a valid frame number (if we are below 0, we consider that the user wants to retrieve the first frame, and similarly if we are after the last frame)

@elyasbny elyasbny force-pushed the SequencePlayerFrameNumber branch from 2b319b2 to bd41200 Compare May 3, 2024 15:13
@elyasbny elyasbny force-pushed the SequencePlayerFrameNumber branch from bd41200 to 631d388 Compare May 3, 2024 15:14
@fabiencastan fabiencastan merged commit 11daec0 into develop May 12, 2024
@fabiencastan fabiencastan deleted the SequencePlayerFrameNumber branch May 12, 2024 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants