Lua console - hack to fix reloading a script if it is not enabled
This commit is contained in:
parent
4c57718f7d
commit
b65f7ae8d9
|
@ -267,10 +267,13 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void OnChanged(object source, FileSystemEventArgs e)
|
||||
{
|
||||
Invoke(new MethodInvoker(delegate
|
||||
// Even after _watches is cleared, these callbacks hang around! So this check is necessary
|
||||
var script = LuaImp.ScriptList.FirstOrDefault(s => s.Path == e.FullPath && s.Enabled);
|
||||
|
||||
if (script != null)
|
||||
{
|
||||
RefreshScriptMenuItem_Click(null, null);
|
||||
}));
|
||||
Invoke(new MethodInvoker(delegate { RefreshScriptMenuItem_Click(null, null); }));
|
||||
}
|
||||
}
|
||||
|
||||
public void LoadLuaFile(string path)
|
||||
|
|
Loading…
Reference in New Issue