diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index ba9f5dba..31b5a661 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -418,6 +418,7 @@ namespace VEPROMS.CSLA.Library if (itemInfo == null) return; itemInfo.LoadAllAtOnce = true; itemInfo.ActiveParent = itemParent; + // itemInfo.ActiveSection = (itemInfo as SectionInfo) ?? sectionInfo; - possible fix for not accessing correct format itemInfo.ActiveSection = sectionInfo; itemInfo.MyProcedure = procInfo; itemInfo.MyDocVersion = docVersionInfo; @@ -446,6 +447,7 @@ namespace VEPROMS.CSLA.Library if (itemInfo == null) return; itemInfo.LoadAllAtOnce = true; itemInfo.ActiveParent = itemParent; + // itemInfo.ActiveSection = (itemInfo as SectionInfo) ?? sectionInfo; itemInfo.ActiveSection = sectionInfo; itemInfo.MyDocVersion = docVersionInfo; ROFstInfo rofstinfo = docVersionInfo.DocVersionAssociations[0].MyROFst; @@ -1256,7 +1258,7 @@ namespace VEPROMS.CSLA.Library #endregion public int FoldoutIndex() { - if (ActiveFormat.PlantFormat.FormatData.PrintData.SectionLevelFoldouts && ((ActiveSection.MyDocStyle.StructureStyle.Style ?? 0 & E_DocStructStyle.UseSectionFoldout) == E_DocStructStyle.UseSectionFoldout)) return 0; + if (ActiveFormat.PlantFormat.FormatData.PrintData.SectionLevelFoldouts && (((ActiveSection.MyDocStyle.StructureStyle.Style ?? 0) & E_DocStructStyle.UseSectionFoldout) != 0)) return 0; // now check for floating foldouts. If there is a floating foldout, also find which one it uses. // This is data off of the ? if (ActiveFormat.PlantFormat.FormatData.PrintData.AlternateFloatingFoldout && ActiveSection.IsDefaultSection)