void SelectConfig()
 {
     if (TCAScenario.NamedConfigs.Count == 0)
     {
         GUILayout.Label("", Styles.white, GUILayout.ExpandWidth(true));
     }
     else
     {
         named_configs.DrawButton();
         var new_config = TCAScenario.GetConfig(named_configs.SelectedIndex);
         if (new_config != selected_config)
         {
             selected_config = new_config;
             config_name     = selected_config != null? selected_config.Name : string.Empty;
         }
     }
 }
        void updateCFG()
        {
            //get all ModuleTCA instances in the vessel
            var TCA_Modules = AllTCA(vessel);

            //try to get saved CFG from other modules, if needed
            if (CFG == null)
            {
                foreach (var tca in TCA_Modules)
                {
                    if (tca.CFG == null)
                    {
                        continue;
                    }
                    CFG = tca.CFG;
                    break;
                }
            }
            //if it is found in one of the modules, use it
            //else, get it from common database or create a new one
            if (CFG != null)
            {
                if (CFG.VesselID == Guid.Empty)
                {
                    CFG.VesselID = vessel.id;
                }
                else if (CFG.VesselID != vessel.id)
                {
                    CFG = VesselConfig.FromVesselConfig(vessel, CFG);
                }
                TCAScenario.Configs[CFG.VesselID] = CFG;
            }
            else
            {
                CFG = TCAScenario.GetConfig(vessel);
            }
            //finally, update references in other modules
            TCA_Modules.ForEach(m => m.CFG = CFG);
        }