On Preferred Page Break checkbox: make Supp Info -> Sup Info for consistency
B2017-099: fix crash & printing of HLS with Caution & supinfo & supinfo on HLS too.
This commit is contained in:
parent
0da05e4912
commit
738089548c
@ -125,7 +125,7 @@ namespace Volian.Controls.Library
|
|||||||
this.superTooltipTags.SetSuperTooltip(this.cbPrefPageBreak, new DevComponents.DotNetBar.SuperTooltipInfo("Preferred Page Break for Supplemental Info", "", "When set, starts this step at the top of a page.\r\n\r\nkeyboard command: <Ctrl><Ente" +
|
this.superTooltipTags.SetSuperTooltip(this.cbPrefPageBreak, new DevComponents.DotNetBar.SuperTooltipInfo("Preferred Page Break for Supplemental Info", "", "When set, starts this step at the top of a page.\r\n\r\nkeyboard command: <Ctrl><Ente" +
|
||||||
"r>", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
|
"r>", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
|
||||||
this.cbPrefPageBreak.TabIndex = 1;
|
this.cbPrefPageBreak.TabIndex = 1;
|
||||||
this.cbPrefPageBreak.Text = "Preferred Page Break (for Supp Info)";
|
this.cbPrefPageBreak.Text = "Preferred Page Break (for Sup Info)";
|
||||||
this.cbPrefPageBreak.CheckedChanged += new System.EventHandler(this.cbPrefPageBreak_CheckedChanged);
|
this.cbPrefPageBreak.CheckedChanged += new System.EventHandler(this.cbPrefPageBreak_CheckedChanged);
|
||||||
//
|
//
|
||||||
// cbPageBreak
|
// cbPageBreak
|
||||||
|
@ -1964,6 +1964,11 @@ namespace Volian.Print.Library
|
|||||||
SectionInfo supInfoSect = pg.MyItemInfo.MyActiveSection as SectionInfo;
|
SectionInfo supInfoSect = pg.MyItemInfo.MyActiveSection as SectionInfo;
|
||||||
if (supInfoSect.StepSectPageBreaksForSupInfo != null && supInfoSect.StepSectPageBreaksForSupInfo.Contains(pg.MyItemInfo.ItemID))
|
if (supInfoSect.StepSectPageBreaksForSupInfo != null && supInfoSect.StepSectPageBreaksForSupInfo.Contains(pg.MyItemInfo.ItemID))
|
||||||
supInfoGroups.Add(new List<vlnParagraph>()); // add a grouping since a page break exists
|
supInfoGroups.Add(new List<vlnParagraph>()); // add a grouping since a page break exists
|
||||||
|
if (supInfoGroups.Count == 0)
|
||||||
|
{
|
||||||
|
supInfoGroups.Add(new List<vlnParagraph>()); // add a grouping since a page break exists
|
||||||
|
_MyLog.WarnFormat("SupInfo Print Groups: {0}, {1}", pg.MyItemInfo.ItemID, pg.MyItemInfo.ShortPath);
|
||||||
|
}
|
||||||
supInfoGroups[supInfoGroups.Count - 1].Add(pg); // add paragraph to the last grouping
|
supInfoGroups[supInfoGroups.Count - 1].Add(pg); // add paragraph to the last grouping
|
||||||
}
|
}
|
||||||
return supInfoGroups;
|
return supInfoGroups;
|
||||||
|
@ -1538,7 +1538,11 @@ namespace Volian.Print.Library
|
|||||||
SectionInfo supInfoSect = MyItemInfo.MyActiveSection as SectionInfo;
|
SectionInfo supInfoSect = MyItemInfo.MyActiveSection as SectionInfo;
|
||||||
if (MyPromsPrinter.SupInfoPrintType == E_SupInfoPrintType.DoPageBreaks && MyPromsPrinter.NeedSupInfoBreak && MyItemInfo.SupInfos != null && MyItemInfo.SupInfos.Count > 0)
|
if (MyPromsPrinter.SupInfoPrintType == E_SupInfoPrintType.DoPageBreaks && MyPromsPrinter.NeedSupInfoBreak && MyItemInfo.SupInfos != null && MyItemInfo.SupInfos.Count > 0)
|
||||||
{
|
{
|
||||||
supInfoSect.StepSectPageBreaksForSupInfo.Add(MyItemInfo.SupInfos[0].ItemID);
|
// if this has a caution/note with supinfo, that is id that needs to go in pagination list, unless it is in there.
|
||||||
|
int aboveSupinfoId = ChildrenAboveHaveSupInfo();
|
||||||
|
if (supInfoSect.StepSectPageBreaksForSupInfo.Contains(aboveSupinfoId)) aboveSupinfoId = -1;
|
||||||
|
supInfoSect.StepSectPageBreaks.Add(aboveSupinfoId!=-1?ItemInfo.Get(aboveSupinfoId).MyParent.ItemID:MyItemInfo.ItemID);
|
||||||
|
supInfoSect.StepSectPageBreaksForSupInfo.Add(aboveSupinfoId!=-1?aboveSupinfoId:MyItemInfo.SupInfos[0].ItemID);
|
||||||
MyPromsPrinter.NeedSupInfoBreak = false;
|
MyPromsPrinter.NeedSupInfoBreak = false;
|
||||||
}
|
}
|
||||||
switch (paginate)
|
switch (paginate)
|
||||||
@ -2178,7 +2182,24 @@ namespace Volian.Print.Library
|
|||||||
{
|
{
|
||||||
SectionInfo supInfoSect = ii.MyActiveSection as SectionInfo;
|
SectionInfo supInfoSect = ii.MyActiveSection as SectionInfo;
|
||||||
if (supInfoSect.StepSectPageBreaks.Contains(sib.ItemID)) return -1;
|
if (supInfoSect.StepSectPageBreaks.Contains(sib.ItemID)) return -1;
|
||||||
if (sib.SupInfos != null && sib.SupInfos.Count > 0) return sib.SupInfos[0].ItemID;
|
if (sib.SupInfos != null && sib.SupInfos.Count > 0)
|
||||||
|
{
|
||||||
|
// check if this is in the list of page breaks for supinfos, if not it may have one of its cautions/notes rather than its id:
|
||||||
|
if (!supInfoSect.StepSectPageBreaksForSupInfo.Contains(sib.SupInfos[0].ItemID))
|
||||||
|
{
|
||||||
|
if (sib.Cautions != null)
|
||||||
|
{
|
||||||
|
foreach (ItemInfo caution in sib.Cautions)
|
||||||
|
if (caution.SupInfos != null && caution.SupInfos.Count > 0 && supInfoSect.StepSectPageBreaksForSupInfo.Contains(caution.SupInfos[0].ItemID)) return caution.SupInfos[0].ItemID;
|
||||||
|
}
|
||||||
|
if (sib.Notes != null)
|
||||||
|
{
|
||||||
|
foreach (ItemInfo note in sib.Notes)
|
||||||
|
if (note.SupInfos != null && note.SupInfos.Count > 0 && supInfoSect.StepSectPageBreaksForSupInfo.Contains(note.SupInfos[0].ItemID)) return note.SupInfos[0].ItemID;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return sib.SupInfos[0].ItemID;
|
||||||
|
}
|
||||||
id = GetSubThatHasSupInfoItems(sib, startid);
|
id = GetSubThatHasSupInfoItems(sib, startid);
|
||||||
if (id != -1) return id;
|
if (id != -1) return id;
|
||||||
sib = sib.NextItem;
|
sib = sib.NextItem;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user