diff --git a/ast-visual-studio-extension/CxExtension/Toolbar/BranchesCombobox.cs b/ast-visual-studio-extension/CxExtension/Toolbar/BranchesCombobox.cs index 92d9097..5acdb3e 100644 --- a/ast-visual-studio-extension/CxExtension/Toolbar/BranchesCombobox.cs +++ b/ast-visual-studio-extension/CxExtension/Toolbar/BranchesCombobox.cs @@ -99,7 +99,7 @@ public void OnChangeBranch(object sender, SelectionChangedEventArgs e) { if (!(sender is ComboBox branchesCombo) || branchesCombo.SelectedItem == null || branchesCombo.SelectedIndex == -1) { - cxToolbar.EnableScanButtonByCombos(); + cxToolbar.CheckScanButtonStateByCombos(); return; } @@ -122,7 +122,7 @@ public void OnChangeBranch(object sender, SelectionChangedEventArgs e) _ = scansCombobox.LoadScansAsync(projectId, selectedBranch); - cxToolbar.EnableScanButtonByCombos(); + cxToolbar.CheckScanButtonStateByCombos(); } protected override void ResetOthersComboBoxesAndResults() { diff --git a/ast-visual-studio-extension/CxExtension/Toolbar/CxToolbar.cs b/ast-visual-studio-extension/CxExtension/Toolbar/CxToolbar.cs index 1de5a54..d7b7713 100644 --- a/ast-visual-studio-extension/CxExtension/Toolbar/CxToolbar.cs +++ b/ast-visual-studio-extension/CxExtension/Toolbar/CxToolbar.cs @@ -163,7 +163,7 @@ public void Init() control.IsChecked = readOnlyStore.GetBoolean(SettingsUtils.groupByCollection, groupBy.ToString(), SettingsUtils.groupByDefaultValues[groupBy]); } - EnableScanButtonByCombos(); + CheckScanButtonStateByCombos(); _ = IdeScansEnabledAsync(); @@ -311,7 +311,7 @@ private static async Task ASTProjectMatchesWorkspaceProjectAsync(EnvDTE.DT return false; } - public void EnableScanButtonByCombos() + public void CheckScanButtonStateByCombos() { var isProject = ProjectsCombo?.SelectedItem != null && ProjectsCombo.SelectedIndex != -1; var isBranch = BranchesCombo?.SelectedItem != null && BranchesCombo.SelectedIndex != -1; @@ -410,7 +410,7 @@ private async Task PollScanStartedAsync() var scanId = SettingsUtils.GetToolbarValue(Package, SettingsUtils.createdScanIdProperty); if (string.IsNullOrWhiteSpace(scanId)) { - EnableScanButtonByCombos(); + CheckScanButtonStateByCombos(); return; }; var options = default(TaskHandlerOptions); diff --git a/ast-visual-studio-extension/CxExtension/Toolbar/ProjectsCombobox.cs b/ast-visual-studio-extension/CxExtension/Toolbar/ProjectsCombobox.cs index 7c94d66..dcb7220 100644 --- a/ast-visual-studio-extension/CxExtension/Toolbar/ProjectsCombobox.cs +++ b/ast-visual-studio-extension/CxExtension/Toolbar/ProjectsCombobox.cs @@ -145,7 +145,7 @@ public void OnChangeProject(object sender, SelectionChangedEventArgs e) ComboBox projectsCombo = cxToolbar.ProjectsCombo; if (projectsCombo == null || projectsCombo.SelectedItem == null || projectsCombo.SelectedIndex == -1) { - cxToolbar.EnableScanButtonByCombos(); + cxToolbar.CheckScanButtonStateByCombos(); return; } @@ -172,7 +172,7 @@ public void OnChangeProject(object sender, SelectionChangedEventArgs e) _ = branchesCombobox.LoadBranchesAsync(selectedProject); - cxToolbar.EnableScanButtonByCombos(); + cxToolbar.CheckScanButtonStateByCombos(); } protected override void ResetOthersComboBoxesAndResults()