From 5179710c8278359a8687382748defa6ac7addb05 Mon Sep 17 00:00:00 2001 From: adelikat Date: Sun, 2 Sep 2012 01:21:57 +0000 Subject: [PATCH] Ram Search - fix undo --- BizHawk.MultiClient/tools/RamSearch.cs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/BizHawk.MultiClient/tools/RamSearch.cs b/BizHawk.MultiClient/tools/RamSearch.cs index b2394b3179..6dfc3c29a2 100644 --- a/BizHawk.MultiClient/tools/RamSearch.cs +++ b/BizHawk.MultiClient/tools/RamSearch.cs @@ -13,6 +13,7 @@ namespace BizHawk.MultiClient { //TODO: //Go To Address (Ctrl+G) feature + //Multiple undo levels (List> UndoLists) /// /// A winform designed to search through ram values @@ -22,7 +23,6 @@ namespace BizHawk.MultiClient string systemID = "NULL"; List searchList = new List(); List undoList = new List(); - //List weededList = new List(); //When addresses are weeded out, the new list goes here, before going into searchList List redoList = new List(); private bool IsAWeededList = false; //For deciding whether the weeded list is relevant (0 size could mean all were removed in a legit preview List domainMenuItems = new List(); @@ -526,7 +526,7 @@ namespace BizHawk.MultiClient private void SaveUndo() { undoList.Clear(); - undoList.AddRange(searchList.Where(x => x.deleted == false)); + undoList.AddRange(searchList); UndotoolStripButton.Enabled = true; } @@ -673,7 +673,9 @@ namespace BizHawk.MultiClient { SaveUndo(); for (int x = 0; x < searchList.Count; x++) + { searchList[x].changecount = 0; + } DisplaySearchList(); MessageLabel.Text = "Change counts cleared"; } @@ -688,14 +690,6 @@ namespace BizHawk.MultiClient DoUndo(); } - //adelikat: This is now obsolete, if you need a weeded list, look for non-deleted - //private void ReplaceSearchListWithWeedOutList() - //{ - // searchList = new List(weededList); - // weededList.Clear(); - // IsAWeededList = false; - //} - private void DoPreview() { if (Global.Config.RamSearchPreviewMode)