Fixed bug with editor locking.
Fixed bug with editor locking.

--- a/Documents/CHANGES.txt
+++ b/Documents/CHANGES.txt
@@ -2,6 +2,7 @@
     Added: Switch to function on the Target Selector readout.
     Fixed: Flight Engineer not saving its hidden state.
     Fixed: Bug in the phase angle calculations.
+    Fixed: Bug where the Build Engineer would stay locked after hiding with the shortcut key.
 
 1.0.9.3
     Added: Title of the build engineer in compact mode now shows if you are using atmospheric data.

--- a/KerbalEngineer/Editor/BuildAdvanced.cs
+++ b/KerbalEngineer/Editor/BuildAdvanced.cs
@@ -244,6 +244,10 @@
                 if (Input.GetKeyDown(KeyBinder.EditorShowHide))
                 {
                     this.visible = !this.visible;
+                    if (!this.visible)
+                    {
+                        this.EditorLock(false);
+                    }
                 }
 
                 if (!this.visible || EditorLogic.fetch == null || EditorLogic.fetch.ship.parts.Count == 0)
@@ -284,15 +288,11 @@
         {
             if ((this.position.MouseIsOver() || this.bodiesList.Position.MouseIsOver()) && !this.isEditorLocked)
             {
-                EditorLogic.fetch.Lock(true, true, true, "KER_BuildAdvanced");
-                BuildOverlayPartInfo.Hidden = true;
-                this.isEditorLocked = true;
+                this.EditorLock(true);
             }
             else if (!this.position.MouseIsOver() && !this.bodiesList.Position.MouseIsOver() && this.isEditorLocked)
             {
-                EditorLogic.fetch.Unlock("KER_BuildAdvanced");
-                BuildOverlayPartInfo.Hidden = false;
-                this.isEditorLocked = false;
+                this.EditorLock(false);
             }
         }
 
@@ -548,6 +548,22 @@
                 }
             }
             GUILayout.EndVertical();
+        }
+
+        private void EditorLock(bool state)
+        {
+            if (state)
+            {
+                EditorLogic.fetch.Lock(true, true, true, "KER_BuildAdvanced");
+                BuildOverlayPartInfo.Hidden = true;
+                this.isEditorLocked = true;
+            }
+            else
+            {
+                EditorLogic.fetch.Unlock("KER_BuildAdvanced");
+                BuildOverlayPartInfo.Hidden = false;
+                this.isEditorLocked = false;
+            }
         }
 
         /// <summary>

 Binary files a/Output/KerbalEngineer/KerbalEngineer.dll and b/Output/KerbalEngineer/KerbalEngineer.dll differ