diff --git a/PROMS/Volian.Controls.Library/DisplayTransition.cs b/PROMS/Volian.Controls.Library/DisplayTransition.cs index 3c101bbd..c0b84d7e 100644 --- a/PROMS/Volian.Controls.Library/DisplayTransition.cs +++ b/PROMS/Volian.Controls.Library/DisplayTransition.cs @@ -143,7 +143,7 @@ namespace Volian.Controls.Library // Find the procedure level first. while (tmpitm.MyContent.Type != 0) { - if (tmpitm.MyContent.Type >=10000 && tmpitm.MyContent.Type<20000) secitm = tmpitm; + if (tmpitm.MyContent.Type >=10000 && tmpitm.MyContent.Type<20000 && secitm == null) secitm = tmpitm; tmpitm = tmpitm.MyParent; } _CurrentProcedure = tmpitm; @@ -480,7 +480,7 @@ namespace Volian.Controls.Library int active = cbTranSects.Items.Add(secitm); if (secitm.ItemID == secstart) cbTranSects.SelectedIndex = active; } - if (secitm.Sections != null && secitm.Sections.Count > 0) cbTranSectsFillIn(secitm.Sections[0], -1, false); + if (secitm.Sections != null && secitm.Sections.Count > 0) cbTranSectsFillIn(secitm.Sections[0], secstart, false); secitm = (secitm.NextItem != null && secitm.NextItems.Count > 0 ? secitm.NextItems[0] : null); } @@ -707,7 +707,7 @@ namespace Volian.Controls.Library ItemInfo secitm = null; while (tmpitm.MyContent.Type != 0) // find current section { - if (tmpitm.MyContent.Type >= 10000 && tmpitm.MyContent.Type < 20000) secitm = tmpitm; + if (tmpitm.MyContent.Type >= 10000 && tmpitm.MyContent.Type < 20000 && secitm == null) secitm = tmpitm; tmpitm = tmpitm.MyParent; } int sectstartid = FindSectionStart(_CurrentProcedure); @@ -721,7 +721,7 @@ namespace Volian.Controls.Library // get section selected and if it's a step section, fill in the treeview of steps if (cbTranSects.Items.Count > 0) { - ItemInfo secitm = (ItemInfo) cbTranSects.SelectedItem; + ItemInfo secitm = (ItemInfo)cbTranSects.SelectedItem; if (secitm == null || !secitm.IsStepSection) { tvTran.Nodes.Clear();