From 191648da4b3ac0bedb1841647925955b0dc27ab6 Mon Sep 17 00:00:00 2001 From: John Date: Fri, 28 Oct 2016 13:42:53 +0000 Subject: [PATCH] =?UTF-8?q?B2016-211=20=E2=80=93=20don=E2=80=99t=20expand?= =?UTF-8?q?=20all=20the=20sub=20sections=20when=20entering=20a=20procedure?= =?UTF-8?q?=20from=20the=20parent=20section?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PROMS/Volian.Controls.Library/RTBItem.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/PROMS/Volian.Controls.Library/RTBItem.cs b/PROMS/Volian.Controls.Library/RTBItem.cs index a38577ee..2e60121f 100644 --- a/PROMS/Volian.Controls.Library/RTBItem.cs +++ b/PROMS/Volian.Controls.Library/RTBItem.cs @@ -245,7 +245,8 @@ namespace Volian.Controls.Library public RTBItem(ItemInfo itemInfo, StepPanel myStepPanel, EditItem myParentEditItem, ChildRelation myChildRelation, bool expand) { // B2016-179 If the parent is a section and the child is not a step then set expand to true. - expand |= !itemInfo.IsStepPart && itemInfo.ActiveParent.IsSection; + // B2016-211 Added subsection check - don't expand all of the sub sections when you open a section (Farley) + expand |= (!itemInfo.IsStepPart && itemInfo.ActiveParent.IsSection) && !itemInfo.IsSubsection; //// TIMING: DisplayItem.TimeIt("CSLARTB Top"); InitializeComponent();// TODO: Performance 25% SetupEditItem(itemInfo, myStepPanel, myParentEditItem, myChildRelation, expand, null, false); @@ -254,7 +255,8 @@ namespace Volian.Controls.Library public RTBItem(ItemInfo itemInfo, StepPanel myStepPanel, EditItem myParentEditItem, ChildRelation myChildRelation, bool expand, EditItem nextEditItem) { // B2016-179 If the parent is a section and the child is not a step then set expand to true. - expand |= !itemInfo.IsStepPart && itemInfo.ActiveParent is SectionInfo; + // B2016-211 Added subsection check - don't expand all of the sub sections when you open a section (Farley) + expand |= (!itemInfo.IsStepPart && itemInfo.ActiveParent is SectionInfo) && !itemInfo.IsSubsection; //// TIMING: DisplayItem.TimeIt("CSLARTB Top"); InitializeComponent();// TODO: Performance 25% SetupEditItem(itemInfo, myStepPanel, myParentEditItem, myChildRelation, expand, nextEditItem, false); @@ -263,7 +265,8 @@ namespace Volian.Controls.Library public RTBItem(ItemInfo itemInfo, StepPanel myStepPanel, EditItem myParentEditItem, ChildRelation myChildRelation, bool expand, bool addFirstChld) { // B2016-179 If the parent is a section and the child is not a step then set expand to true. - expand |= !itemInfo.IsStepPart && itemInfo.ActiveParent is SectionInfo; + // B2016-211 Added subsection check - don't expand all of the sub sections when you open a section (Farley) + expand |= (!itemInfo.IsStepPart && itemInfo.ActiveParent is SectionInfo) && !itemInfo.IsSubsection; //// TIMING: DisplayItem.TimeIt("CSLARTB Top"); InitializeComponent();// TODO: Performance 25% SetupEditItem(itemInfo, myStepPanel, myParentEditItem, myChildRelation, expand, null, addFirstChld);