From 802fe37a5ff907bebaa1a510f58f351ac863da9c Mon Sep 17 00:00:00 2001 From: Rich Dunne Date: Wed, 7 Jul 2021 07:26:24 -0600 Subject: [PATCH] ImportPath option enabled based on if there are any paths to import --- SceneManager/Menus/PathMainMenu.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/SceneManager/Menus/PathMainMenu.cs b/SceneManager/Menus/PathMainMenu.cs index 065e215..50e96cc 100644 --- a/SceneManager/Menus/PathMainMenu.cs +++ b/SceneManager/Menus/PathMainMenu.cs @@ -18,7 +18,7 @@ namespace SceneManager.Menus internal static UIMenuItem ExportPath { get; } = new UIMenuItem("Export Paths", "Export selected paths to ~b~plugins/SceneManager/Saved Paths"); internal static UIMenuItem DeleteAllPaths { get; } = new UIMenuItem("Delete All Paths"); internal static UIMenuListScrollerItem EditPath { get; private set; } - internal static UIMenuCheckboxItem DisableAllPaths { get; } = new UIMenuCheckboxItem("Disable All Paths", false); + internal static UIMenuCheckboxItem DisableAllPaths { get; } = new UIMenuCheckboxItem("Disable All Path Collection", false); internal static void Initialize() { @@ -39,7 +39,7 @@ namespace SceneManager.Menus CreateNewPath.ForeColor = Color.Gold; Menu.AddItem(ImportPath); ImportPath.ForeColor = Color.Gold; - ImportPath.Enabled = PathManager.ImportedPaths.Count > 0; + ImportPath.Enabled = ImportPathMenu.ImportedFileNames.Count > 0; Menu.AddItem(ExportPath); ExportPath.ForeColor = Color.Gold; ExportPath.Enabled = PathManager.Paths.Any(x => x != null); @@ -62,7 +62,7 @@ namespace SceneManager.Menus DeleteAllPaths.Enabled = false; DisableAllPaths.Enabled = false; } - if(PathManager.ImportedPaths.Count == 0) + if(ImportPathMenu.ImportedFileNames.Count == 0) { ImportPath.Enabled = false; } @@ -95,10 +95,9 @@ namespace SceneManager.Menus if (selectedItem == DeleteAllPaths) { PathManager.DeleteAllPaths(); - DisableAllPaths.Checked = false; - Build(); + PathManager.LoadedFiles.Clear(); + MenuManager.BuildMenus(); Menu.Visible = true; - BarrierMenu.Build(); } }