diff --git a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs index cadd0b41..d5e7627e 100644 --- a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs +++ b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs @@ -1311,6 +1311,14 @@ namespace VEPROMS.CSLA.Library return LazyLoad(ref _Macro, "@Macro"); } } + private LazyLoad _NotOnEmpty; + public bool NotOnEmpty + { + get + { + return LazyLoad(ref _NotOnEmpty, "@NotOnEmpty"); + } + } public override string GetPDDisplayName() { return string.Format("[{0}]",Index); } public override string GetPDDescription() @@ -4704,6 +4712,7 @@ namespace VEPROMS.CSLA.Library return LazyLoad(ref _NotInRNO, "@NotInRNO"); } } + private bool? _Inherited; public bool Inherited { diff --git a/PROMS/Volian.Controls.Library/DisplayTags.cs b/PROMS/Volian.Controls.Library/DisplayTags.cs index 1490991a..1d859b10 100644 --- a/PROMS/Volian.Controls.Library/DisplayTags.cs +++ b/PROMS/Volian.Controls.Library/DisplayTags.cs @@ -156,7 +156,11 @@ namespace Volian.Controls.Library cmbCheckoff.Enabled = false; // Checkoffs already assigned to RNO. if (StepOverRide()) cmbCheckoff.Enabled = false; // Checkoffs already assigned to AER - if (fmtdata.ProcData.CheckOffData.CheckOffList == null || fmtdata.ProcData.CheckOffData.CheckOffList.Count == 0) + // if there are no checkoffs OR + // if this is a sign-off, the checkoff list is not enabled either (matches 16bit functionality) At some point, we + // may want to allow them to turn off the checkoff + if ((fmtdata.ProcData.CheckOffData.CheckOffList == null || fmtdata.ProcData.CheckOffData.CheckOffList.Count == 0) || + fmtdata.ProcData.CheckOffData.Menu=="Signoff") cmbCheckoff.Enabled = false; if (sc == null) // if there is no config data, Page Break and CAS check boxes are false diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 7830e168..81c07d28 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -1373,27 +1373,32 @@ namespace Volian.Print.Library CheckOff co = itemInfo.GetCheckOffStep(); if (co != null) { - float xloc_co = (float)itemInfo.MyDocStyle.Layout.LeftMargin; - // if the format has 'SkipSpaces', look at the tab, and back up the macros to the number of - // spaces in the tab. - if (formatInfo.PlantFormat.FormatData.ProcData.CheckOffData.SkipSpaces) + // if this item's content is empty, and the flag is set to 'notonempty', don't print out the + // checkoff - this was added for shearon harris: + if (!(co.NotOnEmpty && itemInfo.MyContent.Text.Replace(@"\u160?"," ").TrimEnd() == "")) { - if (mytab != null) - xloc_co = mytab.XOffset; - else - xloc_co = XOffset; //there's no tab - put checkoff at step's xoff. Macro should back up from step's x. - } - else - { - if (formatInfo.PlantFormat.FormatData.ProcData.CheckOffData.XLocation != null) - xloc_co += (float)formatInfo.PlantFormat.FormatData.ProcData.CheckOffData.XLocation; - if (formatInfo.PlantFormat.FormatData.ProcData.CheckOffData.RelXLocation != null) + float xloc_co = (float)itemInfo.MyDocStyle.Layout.LeftMargin; + // if the format has 'SkipSpaces', look at the tab, and back up the macros to the number of + // spaces in the tab. + if (formatInfo.PlantFormat.FormatData.ProcData.CheckOffData.SkipSpaces) { - float relX = (float)formatInfo.PlantFormat.FormatData.ProcData.CheckOffData.RelXLocation; - xloc_co = XOffset + (relX > 0 ? Width : 0) + relX; + if (mytab != null) + xloc_co = mytab.XOffset; + else + xloc_co = XOffset; //there's no tab - put checkoff at step's xoff. Macro should back up from step's x. } + else + { + if (formatInfo.PlantFormat.FormatData.ProcData.CheckOffData.XLocation != null) + xloc_co += (float)formatInfo.PlantFormat.FormatData.ProcData.CheckOffData.XLocation; + if (formatInfo.PlantFormat.FormatData.ProcData.CheckOffData.RelXLocation != null) + { + float relX = (float)formatInfo.PlantFormat.FormatData.ProcData.CheckOffData.RelXLocation; + xloc_co = XOffset + (relX > 0 ? Width : 0) + relX; + } + } + PartsRight.Add(new vlnMacro(xloc_co, yForCheckoff, co.Macro)); } - PartsRight.Add(new vlnMacro(xloc_co, yForCheckoff, co.Macro)); } float yOffRight = yoff; float RnoOffset = ToInt(formatInfo.MyStepSectionLayoutData.ColRTable, maxRNO); diff --git a/PROMS/fmtxml/AppendPlantSpecific.cs b/PROMS/fmtxml/AppendPlantSpecific.cs index 7a74da51..f9c9439b 100644 --- a/PROMS/fmtxml/AppendPlantSpecific.cs +++ b/PROMS/fmtxml/AppendPlantSpecific.cs @@ -999,6 +999,7 @@ namespace fmtxml } private void AddSHEfmt(ref FormatData fmtdata) { + fmtdata.ProcData.CheckOffData.CheckOffList[0].NotOnEmpty = "True"; fmtdata.SectData.StepSectionData.StpSectLayData.ColRTable = "0,198,144"; fmtdata.SectData.StepSectionData.StpSectLayData.RNOWidthAlt = "0,186,0"; fmtdata.StepData[2].TabData.Ident = " {numeric}."; diff --git a/PROMS/fmtxml/FmtFileToXml.cs b/PROMS/fmtxml/FmtFileToXml.cs index f7062199..47b6cee1 100644 --- a/PROMS/fmtxml/FmtFileToXml.cs +++ b/PROMS/fmtxml/FmtFileToXml.cs @@ -555,6 +555,7 @@ public struct CheckOff public byte UIMark; public string MenuItem; public string ExcludeInSectMenu; + public string NotOnEmpty; public string Macro; public float CheckOffWidAdjust; public int CheckOffXtraLines; @@ -5092,6 +5093,7 @@ namespace fmtxml if (mco.CheckOffList[i].UIMark == sco.CheckOffList[i].UIMark) subFmt.ProcData.CheckOffData.CheckOffList[i].UIMark = NullByte; if (mco.CheckOffList[i].MenuItem == sco.CheckOffList[i].MenuItem) subFmt.ProcData.CheckOffData.CheckOffList[i].MenuItem = null; if (mco.CheckOffList[i].ExcludeInSectMenu == sco.CheckOffList[i].ExcludeInSectMenu) subFmt.ProcData.CheckOffData.CheckOffList[i].ExcludeInSectMenu = null; + if (mco.CheckOffList[i].NotOnEmpty == sco.CheckOffList[i].NotOnEmpty) subFmt.ProcData.CheckOffData.CheckOffList[i].NotOnEmpty = null; if (mco.CheckOffList[i].Macro == sco.CheckOffList[i].Macro) subFmt.ProcData.CheckOffData.CheckOffList[i].Macro = null; if (mco.CheckOffList[i].CheckOffXtraLines == sco.CheckOffList[i].CheckOffXtraLines) subFmt.ProcData.CheckOffData.CheckOffList[i].CheckOffXtraLines = NullInt; if (mco.CheckOffList[i].CheckOffWidAdjust == sco.CheckOffList[i].CheckOffWidAdjust) subFmt.ProcData.CheckOffData.CheckOffList[i].CheckOffWidAdjust = NullInt; diff --git a/PROMS/fmtxml/TranslateFMT.XSL b/PROMS/fmtxml/TranslateFMT.XSL index ed91e18b..170247d8 100644 Binary files a/PROMS/fmtxml/TranslateFMT.XSL and b/PROMS/fmtxml/TranslateFMT.XSL differ