Ram Search - fix Truncate from file, and exclude ram watch
This commit is contained in:
parent
02c447becb
commit
f519fa0e2d
|
@ -2128,11 +2128,11 @@ namespace BizHawk.MultiClient
|
|||
TruncateFromFile();
|
||||
}
|
||||
|
||||
private void DoTruncate(List<Watch> temp)
|
||||
private void DoTruncate()
|
||||
{
|
||||
|
||||
SaveUndo();
|
||||
MessageLabel.Text = MakeAddressString(undoList.Count) + " removed";
|
||||
MessageLabel.Text = MakeAddressString(searchList.Where(x => x.deleted == true).Count()) + " removed";
|
||||
TrimWeededList();
|
||||
UpdateLastSearch();
|
||||
DisplaySearchList();
|
||||
|
@ -2146,16 +2146,37 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
List<Watch> temp = new List<Watch>();
|
||||
LoadSearchFile(file.FullName, false, true, temp);
|
||||
DoTruncate(temp);
|
||||
TruncateList(temp);
|
||||
DoTruncate();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void ClearWeeded()
|
||||
{
|
||||
foreach (Watch watch in searchList)
|
||||
{
|
||||
watch.deleted = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void TruncateList(List<Watch> toRemove)
|
||||
{
|
||||
ClearWeeded();
|
||||
foreach (Watch watch in toRemove)
|
||||
{
|
||||
searchList.Where(x => x.address == watch.address).FirstOrDefault().deleted = true;
|
||||
}
|
||||
DoTruncate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes Ram Watch list from the search list
|
||||
/// </summary>
|
||||
private void ExcludeRamWatchList()
|
||||
{
|
||||
DoTruncate(Global.MainForm.RamWatch1.GetRamWatchList());
|
||||
TruncateList(Global.MainForm.RamWatch1.GetRamWatchList());
|
||||
}
|
||||
|
||||
private void TruncateFromFiletoolStripButton2_Click(object sender, EventArgs e)
|
||||
|
|
Loading…
Reference in New Issue