Updated VOID_Module.Save to use new VOID_Core.SceneKey to un-break StageInfo settings on reverts.
Updated VOID_Module.Save to use new VOID_Core.SceneKey to un-break StageInfo settings on reverts.

--- a/API/VOIDCore.cs
+++ b/API/VOIDCore.cs
@@ -43,6 +43,8 @@
 		public abstract int ConfigVersion { get; }
 		public virtual bool configNeedsUpdate { get; set; }
 
+		public abstract string SceneKey { get; }
+
 		public abstract int WindowID { get; }
 		public abstract bool configDirty { get; set; }
 		public abstract bool powerAvailable	{ get; protected set; }
@@ -79,9 +81,9 @@
 
 		public abstract void SaveConfig();
 
-		public override void Save(KSP.IO.PluginConfiguration config)
+		public override void Save(KSP.IO.PluginConfiguration config, string sceneKey)
 		{
-			base.Save(config);
+			base.Save(config, sceneKey);
 		}
 	}
 

--- a/API/VOID_HUDModule.cs
+++ b/API/VOID_HUDModule.cs
@@ -161,9 +161,9 @@
 			}
 		}
 
-		public override void Save(KSP.IO.PluginConfiguration config)
-		{
-			base.Save(config);
+		public override void Save(KSP.IO.PluginConfiguration config, string sceneKey)
+		{
+			base.Save(config, sceneKey);
 
 			HUDWindow window;
 			for (int idx = 0; idx < this.Windows.Count; idx++)

--- a/API/VOID_Module.cs
+++ b/API/VOID_Module.cs
@@ -369,7 +369,7 @@
 			}
 		}
 
-		public virtual void Save(KSP.IO.PluginConfiguration config)
+		public virtual void Save(KSP.IO.PluginConfiguration config, string sceneKey)
 		{
 			MemberInfo[] members = this.GetType().GetMembers(
 				BindingFlags.NonPublic |
@@ -407,7 +407,7 @@
 					fieldName = string.Format(
 						"{0}_{1}_{2}",
 						this.GetType().Name,
-						Enum.GetName(typeof(GameScenes), HighLogic.LoadedScene),
+						sceneKey,
 						attr.Name
 					);
 				}

--- a/VOIDCore_Editor.cs
+++ b/VOIDCore_Editor.cs
@@ -38,6 +38,15 @@
 	[VOID_Scenes(GameScenes.EDITOR)]
 	public class VOIDCore_Editor : VOIDCore_Generic<VOIDCore_Editor>
 	{
+		public override string SceneKey
+		{
+			get
+			{
+				return "EDITOR";
+			}
+		}
+
+
 		public override void FixedUpdate() {}
 	}
 }

--- a/VOIDCore_Flight.cs
+++ b/VOIDCore_Flight.cs
@@ -36,6 +36,15 @@
 	[VOID_Scenes(GameScenes.FLIGHT)]
 	public class VOIDCore_Flight : VOIDCore_Generic<VOIDCore_Flight>
 	{
+		public override string SceneKey
+		{
+			get
+			{
+				return "FLIGHT";
+			}
+		}
+
+
 		public override void DrawConfigurables()
 		{
 			if (HighLogic.LoadedSceneIsFlight)

--- a/VOIDCore_Generic.cs
+++ b/VOIDCore_Generic.cs
@@ -1130,14 +1130,14 @@
 
 			config.load();
 
-			this.Save(config);
+			this.Save(config, this.SceneKey);
 
 			IVOID_Module module;
 			for (int idx = 0; idx < this.modules.Count; idx++)
 			{
 				module = this.modules[idx];
 
-				module.Save(config);
+				module.Save(config, this.SceneKey);
 			}
 
 			config.save();

--- a/VOIDCore_SpaceCentre.cs
+++ b/VOIDCore_SpaceCentre.cs
@@ -32,6 +32,14 @@
 	[VOID_Scenes(GameScenes.SPACECENTER)]
 	public class VOIDCore_SpaceCentre : VOIDCore_Generic<VOIDCore_SpaceCentre>
 	{
+		public override string SceneKey
+		{
+			get
+			{
+				return "SPACECENTER";
+			}
+		}
+
 		public override void FixedUpdate() {}
 	}
 }

--- a/VOID_Orbital.cs
+++ b/VOID_Orbital.cs
@@ -123,11 +123,11 @@
 			this.precisionValues = new IntCollection (4, this._precisionValues);
 		}
 
-		public override void Save (KSP.IO.PluginConfiguration config)
+		public override void Save (KSP.IO.PluginConfiguration config, string sceneKey)
 		{
 			this._precisionValues.value = this.precisionValues.collection;
 
-			base.Save (config);
+			base.Save (config, sceneKey);
 		}
 	}
 }

--- a/VOID_StageInfo.cs
+++ b/VOID_StageInfo.cs
@@ -7,7 +7,7 @@
 using KSP;
 using System;
 using System.Collections.Generic;
-using ToadicusTools.GUIUtils;
+using ToadicusTools;
 using UnityEngine;
 
 namespace VOID
@@ -259,7 +259,7 @@
 			{
 				GUILayout.BeginHorizontal();
 
-				this.useSeaLevel.value = Layout.Toggle(this.useSeaLevel, this.seaLevelToggle, false);
+				this.useSeaLevel.value = GUITools.Toggle(this.useSeaLevel, this.seaLevelToggle, false);
 
 				GUILayout.EndHorizontal();
 			}

--- a/VOID_SurfAtmo.cs
+++ b/VOID_SurfAtmo.cs
@@ -105,11 +105,11 @@
 			this.precisionValues = new IntCollection(4, this._precisionValues);
 		}
 
-		public override void Save(KSP.IO.PluginConfiguration config)
+		public override void Save(KSP.IO.PluginConfiguration config, string sceneKey)
 		{
 			this._precisionValues.value = this.precisionValues.collection;
 
-			base.Save(config);
+			base.Save(config, sceneKey);
 		}
 	}
 }