Move attaching of callbacks from LuaConsole_Load to Restart
Y'know, where the thing they're being passed to is created... I don't think them only being attached once was a problem, as one is also called from elsewhere and the other is kinda useless
This commit is contained in:
parent
f7cacfab99
commit
ddef661eb2
|
@ -166,8 +166,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
Settings = new LuaConsoleSettings();
|
Settings = new LuaConsoleSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
LuaImp.ScriptList.ChangedCallback = SessionChangedCallback;
|
|
||||||
|
|
||||||
if (Config.RecentLuaSession.AutoLoad && !Config.RecentLuaSession.Empty)
|
if (Config.RecentLuaSession.AutoLoad && !Config.RecentLuaSession.Empty)
|
||||||
{
|
{
|
||||||
LoadSessionFromRecent(Config.RecentLuaSession.MostRecent);
|
LoadSessionFromRecent(Config.RecentLuaSession.MostRecent);
|
||||||
|
@ -196,7 +194,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
SetColumns();
|
SetColumns();
|
||||||
|
|
||||||
splitContainer1.SetDistanceOrDefault(Settings.SplitDistance, _defaultSplitDistance);
|
splitContainer1.SetDistanceOrDefault(Settings.SplitDistance, _defaultSplitDistance);
|
||||||
LuaImp.RegisteredFunctions.ChangedCallback = UpdateRegisteredFunctionsDialog;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void BranchesMarkersSplit_SplitterMoved(object sender, SplitterEventArgs e)
|
private void BranchesMarkersSplit_SplitterMoved(object sender, SplitterEventArgs e)
|
||||||
|
@ -232,6 +229,8 @@ namespace BizHawk.Client.EmuHawk
|
||||||
? new UnixLuaLibraries()
|
? new UnixLuaLibraries()
|
||||||
: new Win32LuaLibraries(Emulator.ServiceProvider, (MainForm) MainForm, DisplayManager, InputManager, Config, Emulator, Game);
|
: new Win32LuaLibraries(Emulator.ServiceProvider, (MainForm) MainForm, DisplayManager, InputManager, Config, Emulator, Game);
|
||||||
LuaImp.ScriptList.AddRange(currentScripts ?? Enumerable.Empty<LuaFile>());
|
LuaImp.ScriptList.AddRange(currentScripts ?? Enumerable.Empty<LuaFile>());
|
||||||
|
LuaImp.ScriptList.ChangedCallback = SessionChangedCallback;
|
||||||
|
LuaImp.RegisteredFunctions.ChangedCallback = UpdateRegisteredFunctionsDialog;
|
||||||
|
|
||||||
InputBox.AutoCompleteCustomSource.AddRange(LuaImp.Docs.Select(a => $"{a.Library}.{a.Name}").ToArray());
|
InputBox.AutoCompleteCustomSource.AddRange(LuaImp.Docs.Select(a => $"{a.Library}.{a.Name}").ToArray());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue