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:
parent
2175f77831
commit
68d3f0a683
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user