From a10fd7ea73e88a198ae8812f451640b61d0ab814 Mon Sep 17 00:00:00 2001 From: Kathy Date: Thu, 5 Sep 2013 15:48:43 +0000 Subject: [PATCH] Fix determining whether attachment has associated foldout --- PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)