lua console - fix recent scripts not updating when creating a new script, opening a script, or duplicating a script. Might be other scenarios that are currently missing (regression from some refactors about a month ago)
This commit is contained in:
parent
4ad89667d6
commit
33a0954087
|
@ -879,6 +879,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
string defaultTemplate = "while true do\n\temu.frameadvance();\nend";
|
||||
File.WriteAllText(sfd.FileName, defaultTemplate);
|
||||
LuaImp.ScriptList.Add(new LuaFile(Path.GetFileNameWithoutExtension(sfd.FileName), sfd.FileName));
|
||||
Config.RecentLua.Add(sfd.FileName);
|
||||
UpdateDialog();
|
||||
Process.Start(new ProcessStartInfo
|
||||
{
|
||||
|
@ -910,6 +911,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
foreach (var file in ofd.FileNames)
|
||||
{
|
||||
LoadLuaFile(file);
|
||||
Config.RecentLua.Add(file);
|
||||
}
|
||||
|
||||
UpdateDialog();
|
||||
|
@ -1040,6 +1042,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
string text = File.ReadAllText(script.Path);
|
||||
File.WriteAllText(sfd.FileName, text);
|
||||
LuaImp.ScriptList.Add(new LuaFile(Path.GetFileNameWithoutExtension(sfd.FileName), sfd.FileName));
|
||||
Config.RecentLua.Add(sfd.FileName);
|
||||
UpdateDialog();
|
||||
Process.Start(new ProcessStartInfo
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue