Skip to content
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

Fix various distance snap grid weirdness around unsnapped objects #30062

Merged
merged 3 commits into from
Oct 1, 2024

Conversation

bdach
Copy link
Collaborator

@bdach bdach commented Sep 30, 2024

Closes #30023.

I am only somewhat confident of these changes, so take with several pillars of salt.

Fix distance spacing grid displaying incorrectly for unsnapped objects with duration

As far as I can tell, this issue is specific to objects whose heads are snapped to the current beat divisor, but tails are not. FindSnappedDistance() seems to have presumed this to be impossible, and as such just used the head's start time, which is not correct, because it will behave as if a timing point was placed at the tail (or, in other words, objects will be snapped temporally using the correct beat length, but relative to the unsnapped tail).

Fix distance snap grid using wrong colour when reference object is unsnapped

This only reproduces if the unsnapped object lies on the latter half of a beat (think 700ms at beat length of 250ms). Rounding would thus shift the colours assigned up a beat.

@bdach bdach changed the title Distance snap weirdness Fix various distance snap gird weirdness Sep 30, 2024
@bdach bdach changed the title Fix various distance snap gird weirdness Fix various distance snap grid weirdness Sep 30, 2024
@bdach bdach changed the title Fix various distance snap grid weirdness Fix various distance snap grid weirdness around unsnapped objects Sep 30, 2024
@pull-request-size pull-request-size bot added size/L and removed size/M labels Sep 30, 2024
@pull-request-size pull-request-size bot added size/M and removed size/L labels Sep 30, 2024
@bdach
Copy link
Collaborator Author

bdach commented Sep 30, 2024

(sorry for force push, accidentally pushed next change to wrong branch 🙈)

@peppy peppy self-requested a review October 1, 2024 07:13
@peppy
Copy link
Member

peppy commented Oct 1, 2024

I feel like I tried to make this very change in the past and somehow couldn't get it working, but this seems to work as expected (and reads pretty well). 👍

@peppy peppy merged commit 87ab953 into ppy:master Oct 1, 2024
8 of 20 checks passed
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.

Distance Snapping follows last object beat divisor, hard to work with
2 participants