Ram Watch - fix bug where it asks you to save changes, but if this is a fresh unsaved list it ignores the Yes button and closes

This commit is contained in:
adelikat 2014-03-23 16:58:54 +00:00
parent d44649bf82
commit 555c9dfb45
1 changed files with 8 additions and 1 deletions

View File

@ -106,9 +106,16 @@ namespace BizHawk.Client.EmuHawk
var result = MessageBox.Show("Save Changes?", "Ram Watch", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button3);
GlobalWin.Sound.StartSound();
if (result == DialogResult.Yes)
{
if (string.IsNullOrWhiteSpace(_watches.CurrentFileName))
{
SaveAs();
}
else
{
_watches.Save();
}
}
else if (result == DialogResult.No)
{
_watches.Changes = false;