From 24a517d2931f07ba9ce6e9b07bc78448e966e171 Mon Sep 17 00:00:00 2001 From: adelikat Date: Wed, 28 Jan 2015 14:38:06 +0000 Subject: [PATCH] Lua - properly re-inject core dependencies on restart --- BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs b/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs index 14fb548164..61da71b365 100644 --- a/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs +++ b/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs @@ -37,7 +37,7 @@ namespace BizHawk.Client.EmuHawk }; InitializeComponent(); - LuaImp = new EmuLuaLibrary(this); + Closing += (o, e) => { if (AskSaveChanges()) @@ -54,8 +54,6 @@ namespace BizHawk.Client.EmuHawk LuaListView.QueryItemText += LuaListView_QueryItemText; LuaListView.QueryItemBkColor += LuaListView_QueryItemBkColor; LuaListView.VirtualMode = true; - - InputBox.AutoCompleteCustomSource.AddRange(LuaImp.Docs.Select(a => a.Library + "." + a.Name).ToArray()); } public EmuLuaLibrary LuaImp { get; set; } @@ -105,6 +103,8 @@ namespace BizHawk.Client.EmuHawk public void Restart() { + LuaImp = new EmuLuaLibrary(this); + InputBox.AutoCompleteCustomSource.AddRange(LuaImp.Docs.Select(a => a.Library + "." + a.Name).ToArray()); UpdateDialog(); }