Cheats Dialog - fix losing of values on restart, editing a cheat flags changes

This commit is contained in:
adelikat 2012-09-01 19:29:41 +00:00
parent d586876f40
commit 0e1bf887b6
2 changed files with 11 additions and 0 deletions

View File

@ -1401,6 +1401,7 @@ namespace BizHawk.MultiClient
Global.OSD.AddMessage("Cheats file loaded");
}
}
Cheats1.UpdateValues();
CurrentlyOpenRom = file.CanonicalFullPath;
HandlePlatformMenus();

View File

@ -29,6 +29,7 @@ namespace BizHawk.MultiClient
NameBox.Text = "";
AddressBox.Text = "";
ValueBox.Text = "";
CompareBox.Text = "";
PopulateMemoryDomainComboBox();
AddressBox.MaxLength = GetNumDigits(Global.Emulator.MemoryDomains[0].Size - 1);
}
@ -40,6 +41,14 @@ namespace BizHawk.MultiClient
ClearFields();
}
public void UpdateValues()
{
if (!this.IsHandleCreated || this.IsDisposed) return;
CheatListView.ItemCount = Global.CheatList.Count;
DisplayCheatsList();
CheatListView.Refresh();
}
public Cheats()
{
InitializeComponent();
@ -782,6 +791,7 @@ namespace BizHawk.MultiClient
{
Global.CheatList.Remove(Global.CheatList.Cheat(indexes[0]));
Global.CheatList.Add(MakeCheat());
Changes();
}
CheatListView.Refresh();
}