mirror of
https://github.com/osukey/osukey.git
synced 2025-08-06 16:13:57 +09:00
Fix undo history not being batched correctly for depth change operations
This commit is contained in:
@ -566,6 +566,8 @@ namespace osu.Game.Overlays.SkinEditor
|
|||||||
if (getTarget(selectedTarget.Value) is not SkinComponentsContainer target)
|
if (getTarget(selectedTarget.Value) is not SkinComponentsContainer target)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
changeHandler?.BeginChange();
|
||||||
|
|
||||||
// Iterating by target components order ensures we maintain the same order across selected components, regardless
|
// Iterating by target components order ensures we maintain the same order across selected components, regardless
|
||||||
// of the order they were selected in.
|
// of the order they were selected in.
|
||||||
foreach (var d in target.Components.ToArray())
|
foreach (var d in target.Components.ToArray())
|
||||||
@ -579,6 +581,8 @@ namespace osu.Game.Overlays.SkinEditor
|
|||||||
SelectedComponents.Add(d);
|
SelectedComponents.Add(d);
|
||||||
target.Add(d);
|
target.Add(d);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
changeHandler?.EndChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendSelectionToBack()
|
public void SendSelectionToBack()
|
||||||
@ -586,6 +590,8 @@ namespace osu.Game.Overlays.SkinEditor
|
|||||||
if (getTarget(selectedTarget.Value) is not SkinComponentsContainer target)
|
if (getTarget(selectedTarget.Value) is not SkinComponentsContainer target)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
changeHandler?.BeginChange();
|
||||||
|
|
||||||
foreach (var d in target.Components.ToArray())
|
foreach (var d in target.Components.ToArray())
|
||||||
{
|
{
|
||||||
if (SelectedComponents.Contains(d))
|
if (SelectedComponents.Contains(d))
|
||||||
@ -594,6 +600,8 @@ namespace osu.Game.Overlays.SkinEditor
|
|||||||
target.Remove(d, false);
|
target.Remove(d, false);
|
||||||
target.Add(d);
|
target.Add(d);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
changeHandler?.EndChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Drag & drop import handling
|
#region Drag & drop import handling
|
||||||
|
Reference in New Issue
Block a user