From d30bb2e32901dff1892804d08a3d7ab5413e9523 Mon Sep 17 00:00:00 2001 From: mschill Date: Wed, 5 Feb 2025 08:38:18 -0500 Subject: [PATCH] =?UTF-8?q?B2025-012=20PROMS=20=E2=80=93=20Searching=20Ste?= =?UTF-8?q?p=20Elements=20=E2=80=93=20All=20Step=20Types?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When searching for step elements (the Find Selected Step Elements option is selected) and "All Types." Is selected for step types, you incorrectly get the "No Types Selected" message box when clicking on search. --- .../Volian.Controls.Library/DisplaySearch.cs | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/PROMS/Volian.Controls.Library/DisplaySearch.cs b/PROMS/Volian.Controls.Library/DisplaySearch.cs index bd9adf04..9fc5cb6c 100644 --- a/PROMS/Volian.Controls.Library/DisplaySearch.cs +++ b/PROMS/Volian.Controls.Library/DisplaySearch.cs @@ -2712,6 +2712,17 @@ namespace Volian.Controls.Library lstCheckedStepTypes.Remove((int)sd.Index); lstCheckedStepTypesStr.Remove(advTreeStepTypes.SelectedNode.Text); } + + //B2025-012 Find Step Elements + //uncheck the parents if there are any + DevComponents.AdvTree.Node tmp_n = n; + while (tmp_n.Parent != null) + { + tmp_n = tmp_n.Parent; + tmp_n.Checked = false; + } + //uncheck All Types + advTreeStepTypes.Nodes[0].Checked = false; } //C2023-010: Check if the node has children and if we need to process those children as well @@ -2724,6 +2735,37 @@ namespace Volian.Controls.Library advTreeStepTypes_AfterCheck(sender, null); } } + else if (n.Text == "All Types") + { + //B2025-012 Find Step Elements + //if checking / un-checking All Types + //Add Types to type list appropriately + if (n.Checked) + { + foreach (Node child in advTreeStepTypes.Nodes) + { + if (child.Text != "All Types") + { + child.Checked = true; + advTreeStepTypes.SelectedNode = child; + advTreeStepTypes_AfterCheck(sender, null); + } + } + } + else + { + foreach (Node child in advTreeStepTypes.Nodes) + { + if (child.Text != "All Types") + { + child.Checked = false; + advTreeStepTypes.SelectedNode = child; + advTreeStepTypes_AfterCheck(sender, null); + } + } + } + + } buildStepTypePannelTitle(); -- 2.47.2