ram watch: allow duplicate identical ram watches
Allows duplicating identical Ram Watches. Previously, the Duplicate Watch dialog would silently discard a new watch if the address didn't change. As a side effect, multiple watches can now be duplicated simulatenously. This commit also removes the check for separate memory domains - it doesn't seem to cause any problems
This commit is contained in:
parent
d6994ea1af
commit
85d140c4b5
|
@ -174,17 +174,13 @@ namespace BizHawk.Client.Common
|
|||
|
||||
/// <summary>
|
||||
/// Add an existing collection of <see cref="Watch"/> into the current one
|
||||
/// <see cref="Watch"/> equality will be checked to avoid doubles
|
||||
/// </summary>
|
||||
/// <param name="watches"><see cref="IEnumerable{Watch}"/> of watch to merge</param>
|
||||
public void AddRange(IEnumerable<Watch> watches)
|
||||
{
|
||||
Parallel.ForEach(watches, watch =>
|
||||
{
|
||||
if (!_watchList.Contains(watch))
|
||||
{
|
||||
_watchList.Add(watch);
|
||||
}
|
||||
_watchList.Add(watch);
|
||||
});
|
||||
Changes = true;
|
||||
}
|
||||
|
|
|
@ -350,14 +350,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
if (SelectedWatches.Any())
|
||||
{
|
||||
foreach (var sw in SelectedWatches)
|
||||
{
|
||||
if (sw.Domain != SelectedWatches.First().Domain)
|
||||
{
|
||||
throw new InvalidOperationException("Can't edit multiple watches on varying memory domains");
|
||||
}
|
||||
}
|
||||
|
||||
var we = new WatchEditor
|
||||
{
|
||||
InitialLocation = this.ChildPointToScreen(WatchListView),
|
||||
|
|
Loading…
Reference in New Issue