-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Support undo/redo for control points in the Editor #18668
Conversation
It doesn't seem to be perfect in all cases:
These are issues elsewhere and relate to the way |
Co-authored-by: Berkan Diler <berkan.diler1@ingka.ikea.com>
Probably fine / much better than nothing at all. Not sure the scroll speed setting should even be visible there. |
ef87b8a
to
5a18547
Compare
Sorry for the force push, I changed no earlier code, only removed a new commit that tried to fix |
Nah, I'm currently fixing the assertion failures. |
Should be reviewable now. |
Also not sure if related, but there's a weird bug with the bottom timeline display where control points are supposed to be shown: 2022-06-13.10-17-26.mp4Appears that consecutive undoes hide and show the control point indicators... for some reason? Not sure if related, just bringing it up as something I noticed. |
The timeline issue could be related to incrementally adding every control point rather than giving a list with every control point populated at once. But probably a separate issue from this branch...? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks ok to me
This doesn't seem to handle the case where a new type is added to an existing group, is that known / expected? And after doing this then adding a new control point... things get really weird... osu.Game.Tests.2022-06-14.at.10.03.38.mp4 |
Probably because the type isn't doing anything? It's only undoing/redoing based on what actually gets written to the file, so those points are probably becoming redundant & removed during write? |
Hmm... that's... very awkward. Especially since it doesn't clear redo states. So you hit redo and suddenly you are in a completely broken looking state. At very least I think the redo history needs to be purged in these cases. |
Something has regressed with selected rows on the timing screen. After cloning a point, the newly cloned point is not selected visually (but seems to have the selection internally). I've checked that this works correctly on osu.Game.Tests.2022-06-14.at.10.08.08.mp4
Observed row not selected. |
Admittedly I didn't thoroughly test redoing so I didn't notice it breaking it, though your video doesn't show it. |
I had a video which has me redoing, but I didn't know what was going on and didn't think it would transfer well to a video 😅 |
Previously, all control points would get replaced, which led to performance issues that was worked around in this PR. By comparing control points, we're able to get good performance without requiring the workaround.
Please try this PR again and see if you can break it still. I think I might've resolved both the above issues by not replacing all control points. There's still some weirdness (which I can't handle), that's best described with a video: 2022-06-20.15-35-15.mp4In the video, I'm doing much the same actions as #18668 (comment).
|
I can still get in a state where the row isn't selected. I'm not too concerned about certain changes remaining unsupported (like the scroll speed one in the video) but having the row non-selectable is quite breaking. Haven't looked at the code changes yet, but maybe a fix can be applied more locally to the table control rather than adding the overhead with equality etc? osu.Game.Tests.2022-06-20.at.07.12.34.mp4 |
Looks like the breaking is reproed by:
That's exactly what I was doing before, but it's even worse that way (breakage-wise) because performance starts to become a factor and you need to add layers of workarounds to resolve it. As it is, the current (/new) code is basically what we'd have to do with per-object diffing anyway. I prefer equality, but let's see if the above issue changes my view on things. |
Above issue should be fixed (via ca287d0). Though I understand there's quite a lot of files changed here, I still believe that control point equality is the way to go. I can split the changes out if it makes it easier to review - these changes are MVP and I'd also like to annotate |
I've checked this branch out again today, and I feel that this branch is as good a state as it can probably be. Which is to say, there is still breakage, but it's breakage that is definitely out of scope of this pull. See the following example: 2022-06-21.22-18-07.mp4In the above video I manage to duplicate an "omit bar line" effect point by doing undo and redo. The reason why I am able to do this boils down to the abuse we have inflicted on I don't see us fully fixing this without getting rid of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems pretty good
Works towards resolving #10314. Now handles control points.
... In the interim until we have binary object comparisons.