Fix behavior of remove in Ram Watch and Cheats too
This commit is contained in:
parent
3d48a0b39e
commit
af6369e14c
|
@ -395,9 +395,10 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void Remove()
|
||||
{
|
||||
if (SelectedItems.Any())
|
||||
var items = SelectedItems.ToList();
|
||||
if (items.Any())
|
||||
{
|
||||
foreach (var item in SelectedItems)
|
||||
foreach (var item in items)
|
||||
{
|
||||
Global.CheatList.Remove(item);
|
||||
}
|
||||
|
|
|
@ -450,9 +450,9 @@ namespace BizHawk.Client.EmuHawk
|
|||
get { return SelectedIndices.Select(index => _searches[index]); }
|
||||
}
|
||||
|
||||
private List<Watch> SelectedWatches
|
||||
private IEnumerable<Watch> SelectedWatches
|
||||
{
|
||||
get { return SelectedItems.Where(x => !x.IsSeparator).ToList(); }
|
||||
get { return SelectedItems.Where(x => !x.IsSeparator); }
|
||||
}
|
||||
|
||||
private void SetRemovedMessage(int val)
|
||||
|
|
|
@ -519,9 +519,10 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void RemoveWatch()
|
||||
{
|
||||
if (SelectedItems.Any())
|
||||
var items = SelectedItems.ToList();
|
||||
if (items.Any())
|
||||
{
|
||||
foreach (var item in SelectedItems)
|
||||
foreach (var item in items)
|
||||
{
|
||||
_watches.Remove(item);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue