mirror of
https://github.com/osukey/osukey.git
synced 2025-05-02 20:27:27 +09:00
Fix undo not behaving as expected sometimes
This commit is contained in:
parent
e0b7539c2a
commit
38b4bd8aef
@ -108,6 +108,11 @@ namespace osu.Game.Screens.Edit
|
|||||||
|
|
||||||
foreach (var (oldObject, newObject) in oldObjects.Zip(newObjects))
|
foreach (var (oldObject, newObject) in oldObjects.Zip(newObjects))
|
||||||
{
|
{
|
||||||
|
// if `oldObject` and `newObject` are the same, it means that `oldObject` was inserted into `editorBeatmap` by `processHitObjects()`.
|
||||||
|
// in that case, there is nothing to do (and some of the subsequent changes may even prove destructive).
|
||||||
|
if (ReferenceEquals(oldObject, newObject))
|
||||||
|
continue;
|
||||||
|
|
||||||
if (oldObject is IHasSliderVelocity oldWithVelocity && newObject is IHasSliderVelocity newWithVelocity)
|
if (oldObject is IHasSliderVelocity oldWithVelocity && newObject is IHasSliderVelocity newWithVelocity)
|
||||||
oldWithVelocity.SliderVelocity = newWithVelocity.SliderVelocity;
|
oldWithVelocity.SliderVelocity = newWithVelocity.SliderVelocity;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user