Skip to content

Buttons not in last segment if segment less than 0.5 seconds #118

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

phillip-hopper
Copy link
Collaborator

@phillip-hopper phillip-hopper commented Sep 30, 2020

Also fixed floating point errors that started happening after updating Windows and Visual Studio


This change is Reviewable

Also fixed floating point errors that started happening after updating Windows and Visual Studio
@tombogle
Copy link
Collaborator

I wonder if this is the desired behavior? I now recall having a discussion with @hatton (years back) and deciding that if the user left a small segment at the end that it was most likely just final cruft in the recording and would not need to be annotated. Now that we've decided that a valid segment can be less than 0.5 seconds, maybe we want to adjust the threshold for this as well, but still leave that logic in place. But maybe that was a bad decision, given Sarah's feedback.

@@ -296,7 +296,7 @@ public BoundaryModificationResult ChangeSegmentsEndBoundary(AnnotationSegment se
/// ------------------------------------------------------------------------------------
public bool GetIsAcceptableSegmentLength(float start, float end)
{
return end - start >= Settings.Default.MinimumSegmentLengthInMilliseconds / 1000f;
return Math.Round(end * 1000 - start * 1000) >= Settings.Default.MinimumSegmentLengthInMilliseconds;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What sort of error was occurring? If this is the necessary fix, probably a comment is needed, lest it be put back later by someone wishing to make it more readable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants