diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index 476d2daf..d74d00ab 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -3033,10 +3033,17 @@ namespace VEPROMS.CSLA.Library font = format.PlantFormat.FormatData.Font; break; case 1: // section - if (format.PlantFormat.FormatData.SectData.SectionHeader.OnlyUnderlineTopSect && MyParent.IsSection) + // B2019-158 Added the OnlyBoldTopSect format flag to control whether the sub-section heading are bolded + // The following logic will turn off the Bolding and/or underlining of sub-section headings + // This logic assumes that the top section header is both bolded and underlined + if ((format.PlantFormat.FormatData.SectData.SectionHeader.OnlyUnderlineTopSect || format.PlantFormat.FormatData.SectData.SectionHeader.OnlyBoldTopSect) && MyParent.IsSection) { VE_Font hdrFont = format.PlantFormat.FormatData.SectData.SectionHeader.Font; - E_Style es = (E_Style)(hdrFont.Style & E_Style.Bold); + E_Style es = (E_Style)hdrFont.Style; + if (format.PlantFormat.FormatData.SectData.SectionHeader.OnlyUnderlineTopSect) + es = es & E_Style.Bold; // only keep the underline (turn off the bold) + if (format.PlantFormat.FormatData.SectData.SectionHeader.OnlyBoldTopSect) + es = es & E_Style.Underline; // only keep the bold (turn off underline) font = new VE_Font(hdrFont.Family, (int)hdrFont.Size, es, (float)hdrFont.CPI); } else