Fixed issues with the toolbar button enabled/disabled states in career mode.
Fixed issues with the toolbar button enabled/disabled states in career mode.

 Binary files a/Assets/Plugins/KerbalEngineer.Unity.dll and b/Assets/Plugins/KerbalEngineer.Unity.dll differ
--- a/KerbalEngineer/AppLauncherButton.cs
+++ b/KerbalEngineer/AppLauncherButton.cs
@@ -28,6 +28,17 @@
         private ApplicationLauncherButton m_Button;
 
         /// <summary>
+        ///     Gets the wrapped application launcher button object.
+        /// </summary>
+        public ApplicationLauncherButton Button
+        {
+            get
+            {
+                return m_Button;
+            }
+        }
+
+        /// <summary>
         ///     Gets or sets the toggle button state.
         /// </summary>
         public bool IsOn

--- a/KerbalEngineer/Flight/FlightAppLauncher.cs
+++ b/KerbalEngineer/Flight/FlightAppLauncher.cs
@@ -27,7 +27,7 @@
     [KSPAddon(KSPAddon.Startup.Flight, false)]
     public class FlightAppLauncher : AppLauncherButton, IFlightAppLauncher
     {
-        private static FlightAppLauncher m_Instance;
+        private static FlightAppLauncher s_Instance;
         private FlightMenu m_FlightMenu;
         private GameObject m_MenuObject;
         private GameObject m_MenuPrefab;
@@ -39,7 +39,7 @@
         {
             get
             {
-                return m_Instance;
+                return s_Instance;
             }
         }
 
@@ -145,7 +145,7 @@
             base.Awake();
 
             // set singleton instance
-            m_Instance = this;
+            s_Instance = this;
 
             // cache menu prefab
             if (m_MenuPrefab == null && AssetBundleLoader.Prefabs != null)
@@ -175,6 +175,18 @@
         protected override void OnTrue()
         {
             Open();
+        }
+
+        protected virtual void Update()
+        {
+            if (FlightEngineerCore.IsDisplayable && Button.IsEnabled == false)
+            {
+                Enable();
+            }
+            else if (FlightEngineerCore.IsDisplayable == false && Button.IsEnabled)
+            {
+                Disable();
+            }
         }
 
         /// <summary>

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