Sort out and fix problems with Ram Search watch files showing up in the Ram Watch recent list
This commit is contained in:
parent
c1b8e6c1d1
commit
48487f2a90
|
@ -590,7 +590,6 @@ namespace BizHawk.Client.Common
|
|||
sw.WriteLine(sb.ToString());
|
||||
}
|
||||
|
||||
Global.Config.RecentWatches.Add(CurrentFileName);
|
||||
Changes = false;
|
||||
return true;
|
||||
}
|
||||
|
@ -734,7 +733,6 @@ namespace BizHawk.Client.Common
|
|||
|
||||
if (!append)
|
||||
{
|
||||
Global.Config.RecentWatches.Add(path);
|
||||
Changes = false;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -850,6 +850,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
var watches = new WatchList(MemoryDomains, _settings.Domain, Emu.SystemId);
|
||||
watches.Load(file.FullName, append);
|
||||
Settings.RecentSearches.Add(watches.CurrentFileName);
|
||||
|
||||
var watchList = watches.Where(x => !x.IsSeparator);
|
||||
var addresses = watchList.Select(x => x.Address).ToList();
|
||||
|
@ -1041,6 +1042,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
_currentFileName = watches.CurrentFileName;
|
||||
MessageLabel.Text = Path.GetFileName(_currentFileName) + " saved";
|
||||
Settings.RecentSearches.Add(watches.CurrentFileName);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -141,6 +141,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
else
|
||||
{
|
||||
_watches.Save();
|
||||
Global.Config.RecentWatches.Add(_watches.CurrentFileName);
|
||||
}
|
||||
}
|
||||
else if (result == DialogResult.No)
|
||||
|
@ -693,6 +694,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
if (_watches.Save())
|
||||
{
|
||||
Global.Config.RecentWatches.Add(_watches.CurrentFileName);
|
||||
UpdateStatusBar(saved: true);
|
||||
}
|
||||
}
|
||||
|
@ -1034,6 +1036,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
if (Path.GetExtension(filePaths[0]) == ".wch")
|
||||
{
|
||||
_watches.Load(filePaths[0], append: false);
|
||||
Global.Config.RecentWatches.Add(_watches.CurrentFileName);
|
||||
WatchListView.ItemCount = _watches.ItemCount;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue