~Added code to handle UI issues when selecting child nodes of a selected node #9

Merged
jjenko merged 1 commits from C2023-010 into Development 2023-07-06 10:59:22 -04:00
2 changed files with 28 additions and 9 deletions

1
.gitignore vendored
View File

@ -401,3 +401,4 @@ FodyWeavers.xsd
/fmtall /fmtall
/genmacall /genmacall
AssemblyInfo.cs

View File

@ -2323,10 +2323,7 @@ namespace Volian.Controls.Library
{ {
foreach (Node tn in nodeCollection) foreach (Node tn in nodeCollection)
{ {
if (!tn.Checked) tn.Checked = tn.Parent.Checked;
tn.Checked = true;
else
tn.Checked = false;
if (tn.Nodes != null && tn.Nodes.Count > 0 && tn.Nodes[0].Text != DummyNodeText) if (tn.Nodes != null && tn.Nodes.Count > 0 && tn.Nodes[0].Text != DummyNodeText)
CheckTreeNodeChildren(tn.Nodes); CheckTreeNodeChildren(tn.Nodes);
@ -2558,6 +2555,10 @@ namespace Volian.Controls.Library
n.Style = DevComponents.AdvTree.NodeStyles.Apple; n.Style = DevComponents.AdvTree.NodeStyles.Apple;
if (sd == null) if (sd == null)
{
//C2023-010: Since the tag is null for Word Sections and HLS types, we need to determine which one has been selected. Word sections we need
//to process, but we need to ignore adding HLS types.
if (n.Text == "WORD Sections")
{ {
if (!lstCheckedStepTypesStr.Contains("WORD Sections")) if (!lstCheckedStepTypesStr.Contains("WORD Sections"))
{ {
@ -2565,6 +2566,7 @@ namespace Volian.Controls.Library
lstCheckedStepTypesStr.Add("WORD Sections"); lstCheckedStepTypesStr.Add("WORD Sections");
} }
} }
}
else else
{ {
if (!lstCheckedStepTypesStr.Contains(advTreeStepTypes.SelectedNode.Text)) if (!lstCheckedStepTypesStr.Contains(advTreeStepTypes.SelectedNode.Text))
@ -2579,10 +2581,15 @@ namespace Volian.Controls.Library
n.Style = null; n.Style = null;
if (sd == null) if (sd == null)
{
//C2023-010: Since the tag is null for Word Sections and HLS types, we need to determine which one has been selected. Word sections we need
//to process, but we need to ignore removing HLS types since they were not added in the previous process.
if (n.Text == "WORD Sections")
{ {
lstCheckedStepTypesStr.Remove("WORD Sections"); lstCheckedStepTypesStr.Remove("WORD Sections");
lstCheckedStepTypes.Remove(0); lstCheckedStepTypes.Remove(0);
} }
}
else else
{ {
lstCheckedStepTypes.Remove((int)sd.Index); lstCheckedStepTypes.Remove((int)sd.Index);
@ -2590,6 +2597,17 @@ namespace Volian.Controls.Library
} }
} }
//C2023-010: Check if the node has children and if we need to process those children as well
if (n.HasChildNodes)
{
foreach (Node child in n.Nodes)
{
child.Checked = n.Checked;
advTreeStepTypes.SelectedNode = child;
advTreeStepTypes_AfterCheck(sender, null);
}
}
buildStepTypePannelTitle(); buildStepTypePannelTitle();
// B2021-100: Enable/disable the RNO Only checkbox & WORD Sections tree node in Step Elements to Search. // B2021-100: Enable/disable the RNO Only checkbox & WORD Sections tree node in Step Elements to Search.