Don’t automatically expend all sub-sections and the steps within them when selecting the main section from the tree. B2016-211

This commit is contained in:
John Jenko 2016-10-12 16:12:35 +00:00
parent a16f1d8110
commit adff92d778

View File

@ -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;
}
/// <summary>
/// Automatically expands Steps if not currently expanded
/// </summary>
@ -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);