B2023-068 fixed a null reference error preventing a SAMG procedure from printing

B2023-069 added a document style flag SecOvrideSupInfoTabOff to allow for the adjustment of the Supplemental Information step tabs on a per section basis
This commit is contained in:
John Jenko 2023-06-05 20:09:45 +00:00
parent 7313a8dea8
commit d63ae83ee8

View File

@ -2426,7 +2426,8 @@ namespace Volian.Print.Library
// and if so, return the id.
ItemInfo par = ii.MyParent;
ItemInfo parsnxt = par.GetNext();
if (!par.IsSection && parsnxt != null)
//B2023-068 check if we are already at the section or procedure level
if (!par.IsSection && !par.IsProcedure && parsnxt != null)
{
par = parsnxt;
while (par != null && !par.IsSection)
@ -6028,6 +6029,10 @@ namespace Volian.Print.Library
{
// The SupInfoTabOff was added to the base format during initial development to shift the tab over by 3/4 inch (54) to allow for enough space for Note/Caution tab
int sitabloc = itemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SupInfoTabOff == null ? 0 : (int)itemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SupInfoTabOff;
// B2023-069 allow for the adjustment of the Supplemental Information tab at the section level (SecOvrideSupInfoTabOff).
// this will also override the SupInoTabOff setting which is for the entire format
int secOvrSupInfoTab = itemInfo.MyDocStyle.SecOvrideSupInfoTabOff == null ? 0 : (int)itemInfo.MyDocStyle.SecOvrideSupInfoTabOff;
if (secOvrSupInfoTab != 0) sitabloc = secOvrSupInfoTab;
XOffset = (float)itemInfo.MyDocStyle.Layout.LeftMargin + sitabloc;
if (myTab != null)
{