Improve check for UseOnFirst/UseOnAllButFirst' docstyle flags
This commit is contained in:
parent
e704c79c28
commit
62ba5c5c05
@ -370,6 +370,7 @@ namespace Volian.Print.Library
|
||||
int progress = 0;
|
||||
int finalMessageSectionID = GetFinalMessageSectionID(myProcedure, doingFoldout);
|
||||
string LastFmtName = null;
|
||||
int lastDocStyle = -1;
|
||||
foreach (SectionInfo mySection in myProcedure.Sections)
|
||||
{
|
||||
if (((mySection.MyContent.Number.ToUpper() == "FOLDOUT" && myProcedure.ActiveFormat.PlantFormat.FormatData.PrintData.SectionLevelFoldouts)
|
||||
@ -383,6 +384,7 @@ namespace Volian.Print.Library
|
||||
if (_MyHelper == null)
|
||||
{
|
||||
LastFmtName = mySection.ActiveFormat.Name;
|
||||
lastDocStyle = (int)mySection.MyDocStyle.Index;
|
||||
string hlsText = "";
|
||||
int hlsItemId = 0;
|
||||
if (mySection.IsStepSection && mySection.Steps != null && mySection.Steps.Count > 0)
|
||||
@ -433,8 +435,12 @@ namespace Volian.Print.Library
|
||||
//Console.WriteLine("'{0}' PromsPrinter", mySection.DisplayText);
|
||||
// if pagination is separate or we've changed the format, we have not done the first page
|
||||
// (if this format has the useonfirst page docstyle flag)
|
||||
if (LastFmtName != mySection.ActiveFormat.Name || mySection.SectionConfig.Section_Pagination == SectionConfig.SectionPagination.Separate)
|
||||
if (LastFmtName != mySection.ActiveFormat.Name || lastDocStyle != (int)mySection.MyDocStyle.Index || mySection.SectionConfig.Section_Pagination == SectionConfig.SectionPagination.Separate)
|
||||
{
|
||||
_MyHelper.DidFirstPageDocStyle = false;
|
||||
lastDocStyle = (int)mySection.MyDocStyle.Index;
|
||||
LastFmtName = mySection.ActiveFormat.Name;
|
||||
}
|
||||
if (!mySection.IsStepSection) _MyHelper.PageBookmarks.Add((ItemInfo)mySection, ((mySection.DisplayNumber ?? "") == "" ? "" : mySection.DisplayNumber + " - ") + mySection.DisplayText, null);
|
||||
_MyHelper.MySection = mySection;
|
||||
OnStatusChanged("After Set Svg", PromsPrinterStatusType.SetSVG);
|
||||
|
Loading…
x
Reference in New Issue
Block a user