Cheats - fix insert separator
This commit is contained in:
parent
8a2a673528
commit
5c22d7433c
|
@ -101,18 +101,22 @@ namespace BizHawk.Client.Common
|
||||||
_cheatList.ForEach(x => x.Pulse());
|
_cheatList.ForEach(x => x.Pulse());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Add(Cheat c)
|
public void Add(Cheat cheat)
|
||||||
{
|
{
|
||||||
c.Changed += CheatChanged;
|
if (!cheat.IsSeparator)
|
||||||
if (_cheatList.Any(x => x.Domain == c.Domain && x.Address == c.Address))
|
|
||||||
{
|
{
|
||||||
_cheatList.FirstOrDefault(x => x.Domain == c.Domain && x.Address == c.Address).Enable();
|
cheat.Changed += CheatChanged;
|
||||||
}
|
if (_cheatList.Any(x => x.Domain == cheat.Domain && x.Address == cheat.Address))
|
||||||
else
|
{
|
||||||
{
|
_cheatList.FirstOrDefault(x => x.Domain == cheat.Domain && x.Address == cheat.Address).Enable();
|
||||||
_cheatList.Add(c);
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_cheatList.Add(cheat);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_cheatList.Add(cheat);
|
||||||
Changes = true;
|
Changes = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue