when editing watches, populate the edit dialog with the actual memorydomain of the watch you're editing, instead of mainmemory

This commit is contained in:
zeromus 2015-11-03 03:24:25 -06:00
parent 27f2ad0f24
commit be4af1ec2f
2 changed files with 6 additions and 2 deletions

View File

@ -397,13 +397,17 @@ 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 memorydomains");
var we = new WatchEditor
{
InitialLocation = this.ChildPointToScreen(WatchListView),
MemoryDomains = _memoryDomains
};
we.SetWatch(_watches.Domain, SelectedWatches, duplicate ? WatchEditor.Mode.Duplicate : WatchEditor.Mode.Edit);
we.SetWatch(SelectedWatches.First().Domain, SelectedWatches, duplicate ? WatchEditor.Mode.Duplicate : WatchEditor.Mode.Edit);
var result = we.ShowHawkDialog();
if (result == DialogResult.OK)

View File

@ -118,7 +118,7 @@ namespace BizHawk.Client.EmuHawk
DomainDropDown.Items.AddRange(MemoryDomains
.Select(d => d.ToString())
.ToArray());
DomainDropDown.SelectedItem = MemoryDomains.MainMemory.ToString();
DomainDropDown.SelectedItem = domain.ToString();
SetTitle();
}