A hackish workaround to make Select All faster in the Cheat Dialog

This commit is contained in:
adelikat 2014-03-23 14:10:35 +00:00
parent 6d1675e54c
commit 8b6bf3fc89
2 changed files with 22 additions and 9 deletions

View File

@ -776,11 +776,21 @@ namespace BizHawk.Client.EmuHawk
selection = -1;
}
// Informs user that a select all event is in place, can be used in change events to wait until this is false
public bool SelectAllInProgress { get; set; }
public void SelectAll()
{
this.BeginUpdate();
SelectAllInProgress = true;
for (var i = 0; i < _itemCount; i++)
{
if (i == _itemCount - 1)
{
SelectAllInProgress = false;
}
this.SelectItem(i, true);
}

View File

@ -388,6 +388,8 @@ namespace BizHawk.Client.EmuHawk
}
private void DoSelectedIndexChange()
{
if (!CheatListView.SelectAllInProgress)
{
if (SelectedCheats.Any())
{
@ -401,6 +403,7 @@ namespace BizHawk.Client.EmuHawk
CheatGroupBox.Text = "New Cheat";
}
}
}
private void StartNewList()
{