From adff92d7789a7b7839fc7490f5bd4c53ad24005b Mon Sep 17 00:00:00 2001 From: John Date: Wed, 12 Oct 2016 16:12:35 +0000 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20automatically=20expend=20all=20?= =?UTF-8?q?sub-sections=20and=20the=20steps=20within=20them=20when=20selec?= =?UTF-8?q?ting=20the=20main=20section=20from=20the=20tree.=20=20B2016-211?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PROMS/Volian.Controls.Library/EditItem.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/PROMS/Volian.Controls.Library/EditItem.cs b/PROMS/Volian.Controls.Library/EditItem.cs index bf003e1c..21ac43a1 100644 --- a/PROMS/Volian.Controls.Library/EditItem.cs +++ b/PROMS/Volian.Controls.Library/EditItem.cs @@ -2150,6 +2150,10 @@ namespace Volian.Controls.Library if (Top != offset) _MyLog.InfoFormat("Didn't work - Top {0} != offset {1} {2}", Top, offset,MyStepPanel.VerticalScroll.Value); } + private bool AtSubSectionLevel() + { + return MyItemInfo.IsSection && MyItemInfo.MyParent.IsSection; + } /// /// Automatically expands Steps if not currently expanded /// @@ -2158,7 +2162,7 @@ namespace Volian.Controls.Library if (CanExpand && Expanded == false)// TODO: May need to do some additional checking for subsections { //vlnStackTrace.ShowStack(">AutoExpand ID {0} - Can {1} Expanded {2}", _MyItem.ItemID, CanExpand, Expanded); - if(MyStepPanel.AutoExpand) + if(MyStepPanel.AutoExpand && !AtSubSectionLevel()) // Bug Fix: B2016-211 was expanding all the steps in all of the sub-sections Expand((_ContentType >= 20000) || MyItemInfo.ActiveFormat.MyStepSectionLayoutData.Dev_Format); else Expand(false);