Check Global.Config.SupressAskSave in ToolManager instead of doing it in the tool dialogs themselves
This commit is contained in:
parent
3784256e56
commit
a3a8170c44
|
@ -118,11 +118,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
public bool AskSave()
|
||||
{
|
||||
if (Global.Config.SupressAskSave)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (Global.CheatList.Changes)
|
||||
{
|
||||
GlobalWin.Sound.StopSound();
|
||||
|
|
|
@ -476,11 +476,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
public bool AskSave()
|
||||
{
|
||||
if (Global.Config.SupressAskSave)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (_luaList.Changes)
|
||||
{
|
||||
GlobalWin.Sound.StopSound();
|
||||
|
|
|
@ -8,9 +8,9 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
public class ToolManager
|
||||
{
|
||||
//TODO: merge ToolHelper code where logical
|
||||
//For instance, add an IToolForm property called UsesCheats, so that a UpdateCheatRelatedTools() method can update all tools of this type
|
||||
//Also a UsesRam, and similar method
|
||||
// TODO: merge ToolHelper code where logical
|
||||
// For instance, add an IToolForm property called UsesCheats, so that a UpdateCheatRelatedTools() method can update all tools of this type
|
||||
// Also a UsesRam, and similar method
|
||||
|
||||
private List<IToolForm> _tools = new List<IToolForm>();
|
||||
|
||||
|
@ -147,6 +147,11 @@ namespace BizHawk.Client.EmuHawk
|
|||
/// <returns></returns>
|
||||
public bool AskSave()
|
||||
{
|
||||
if (Global.Config.SupressAskSave) // User has elected to not be nagged
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
foreach (var tool in _tools)
|
||||
{
|
||||
var result = tool.AskSave();
|
||||
|
@ -167,6 +172,11 @@ namespace BizHawk.Client.EmuHawk
|
|||
/// <returns></returns>
|
||||
public bool AskSave<T>() where T : IToolForm
|
||||
{
|
||||
if (Global.Config.SupressAskSave) // User has elected to not be nagged
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
var tool = _tools.FirstOrDefault(x => x is T);
|
||||
if (tool != null)
|
||||
{
|
||||
|
|
|
@ -99,11 +99,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
public bool AskSave()
|
||||
{
|
||||
if (Global.Config.SupressAskSave) // User has elected to not be nagged
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (_watches.Changes)
|
||||
{
|
||||
GlobalWin.Sound.StopSound();
|
||||
|
|
Loading…
Reference in New Issue