Cheats dialog - never ask to save changes, the cheat system is independent of the dialog and makes intelligent decisions already, no need to annoy the user
This commit is contained in:
parent
c038ed0ed7
commit
82bda9006a
|
@ -41,14 +41,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
Closing += (o, e) =>
|
||||
{
|
||||
if (AskSaveChanges())
|
||||
{
|
||||
SaveConfigSettings();
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Cancel = true;
|
||||
}
|
||||
SaveConfigSettings();
|
||||
};
|
||||
|
||||
CheatListView.QueryItemText += CheatListView_QueryItemText;
|
||||
|
@ -121,26 +114,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
public bool AskSaveChanges()
|
||||
{
|
||||
if (Global.CheatList.Changes)
|
||||
{
|
||||
GlobalWin.Sound.StopSound();
|
||||
var result = MessageBox.Show("Save Changes?", "Cheats", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button3);
|
||||
GlobalWin.Sound.StartSound();
|
||||
if (result == DialogResult.Yes)
|
||||
{
|
||||
Global.CheatList.Save();
|
||||
}
|
||||
else if (result == DialogResult.No)
|
||||
{
|
||||
Global.CheatList.Changes = false;
|
||||
return true;
|
||||
}
|
||||
else if (result == DialogResult.Cancel)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue