Ram Search - more efficient implementation of Undo

This commit is contained in:
andres.delikat 2011-02-19 20:37:12 +00:00
parent 8ae5dc748f
commit 5c78391252
1 changed files with 2 additions and 6 deletions

View File

@ -316,18 +316,14 @@ namespace BizHawk.MultiClient
/// </summary>
private void SaveUndo()
{
undoList.Clear();
for (int x = 0; x < searchList.Count; x++)
undoList.Add(searchList[x]);
undoList = new List<Watch>(searchList);
}
private void DoUndo()
{
if (undoList.Count > 0)
{
searchList.Clear();
for (int x = 0; x < undoList.Count; x++)
searchList.Add(undoList[x]);
searchList = new List<Watch>(undoList);
undoList.Clear();
DisplaySearchList();
}