From d6a57e08c1e723ab68903d251aab96bf7f448e7f Mon Sep 17 00:00:00 2001
From: "andres.delikat" <andres.delikat@4bbf4f03-6f44-549e-7e59-35d4b0962838>
Date: Tue, 10 Jan 2012 02:11:17 +0000
Subject: [PATCH] Toolbox - reload icons on rom open/close so that core
 dependent tools update.

---
 BizHawk.MultiClient/MainForm.cs      |  8 +++++---
 BizHawk.MultiClient/tools/ToolBox.cs | 11 ++++++++++-
 2 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/BizHawk.MultiClient/MainForm.cs b/BizHawk.MultiClient/MainForm.cs
index 06937dc9de..d44b1a6ace 100644
--- a/BizHawk.MultiClient/MainForm.cs
+++ b/BizHawk.MultiClient/MainForm.cs
@@ -1117,8 +1117,8 @@ namespace BizHawk.MultiClient
 				Global.Config.RecentRoms.Add(file.CanonicalFullPath);
 				if (File.Exists(PathManager.SaveRamPath(game)))
 					LoadSaveRam();
-                if (Global.Config.AutoSavestates)
-                    LoadState("Auto");
+				if (Global.Config.AutoSavestates)
+					LoadState("Auto");
 
 				////setup the throttle based on platform's specifications
 				////(one day later for some systems we will need to modify it at runtime as the display mode changes)
@@ -1134,8 +1134,9 @@ namespace BizHawk.MultiClient
 				NESDebug1.Restart();
 				TI83KeyPad1.Restart();
 				TAStudio1.Restart();
-
 				Cheats1.Restart();
+				ToolBox1.Restart();
+
 				if (Global.Config.LoadCheatFileByGame)
 				{
 					if (Global.CheatList.AttemptLoadCheatFile())
@@ -2188,6 +2189,7 @@ namespace BizHawk.MultiClient
 			NESDebug1.Restart();
 			TI83KeyPad1.Restart();
 			Cheats1.Restart();
+			ToolBox1.Restart();
 			Text = "BizHawk" + (INTERIM ? " (interim) " : "");
 			HandlePlatformMenus();
 			StateSlots.Clear();
diff --git a/BizHawk.MultiClient/tools/ToolBox.cs b/BizHawk.MultiClient/tools/ToolBox.cs
index bc236fad9d..49060e6637 100644
--- a/BizHawk.MultiClient/tools/ToolBox.cs
+++ b/BizHawk.MultiClient/tools/ToolBox.cs
@@ -24,7 +24,16 @@ namespace BizHawk.MultiClient
 			int x = Global.MainForm.Location.X + Global.MainForm.Size.Width;
 			int y = Global.MainForm.Location.Y;
 			Location = new Point(x, y);
+			HideShowIcons();
+		}
 
+		public void Restart()
+		{
+			HideShowIcons();
+		}
+
+		private void HideShowIcons()
+		{
 			if (Global.Emulator is NES)
 			{
 				NESPPU.Visible = true;
@@ -39,7 +48,7 @@ namespace BizHawk.MultiClient
 				NESGameGenie.Visible = false;
 				NESNameTable.Visible = false;
 			}
-			
+
 			if (Global.Emulator is TI83)
 			{
 				KeypadTool.Visible = true;