1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-05 10:23:20 +08:00

Fix comparison in PropertyChangeCommand.MergeWith

This commit is contained in:
Marvin Schürz 2024-10-10 21:58:48 +02:00
parent 2175f77831
commit 68d3f0a683

View File

@ -27,8 +27,11 @@ namespace osu.Game.Screens.Edit.Commands
public IMergeableCommand? MergeWith(IEditorCommand previous)
{
if (previous is PropertyChangeCommand<TTarget, TProperty> command && command.Target == Target)
return command;
if (GetType() == previous.GetType())
{
if (ReferenceEquals(Target, ((PropertyChangeCommand<TTarget, TProperty>)previous).Target))
return this;
}
return null;
}