Added logic to not extend the change bar on different types of Notes and Cautions if using the LimitCautionNoteWidthToHLS
Logic to adjust the Note/Caution width when off of a substep and when using the LimitCautionNoteWidthToHLS format flag. Logic to adjust the Yoffset of a note when off of a borderless table.
This commit is contained in:
@@ -121,22 +121,29 @@ namespace Volian.Print.Library
|
||||
{
|
||||
string sep = parent.MyItemInfo.MyHeader == null ? "" : parent.MyItemInfo.MyHeader.CleanText;
|
||||
vlnHeader tmp = vph as vlnHeader;
|
||||
// the separator must exist and the previous must have a change bar.
|
||||
|
||||
if ((sep != "") && (tmp.Text == sep) && parent.MyItemInfo.MyPrevious != null && parent.MyItemInfo.MyPrevious.HasChangeBar)
|
||||
// if the part above is not the same type and it's a Note or Caution and the OnlyBulletSameCautionNoteType is true
|
||||
// don't extend the change bar to the item above
|
||||
if (!parent.MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.OnlyBulletSameCautionNoteType ||
|
||||
((parent.MyItemInfo.IsCaution || parent.MyItemInfo.IsNote) &&
|
||||
(parent.MyItemInfo.MyContent.Type != vph.MyParent.MyItemInfo.MyContent.Type)))
|
||||
{
|
||||
if (MyPageHelper.MyParagraphs.ContainsKey(parent.MyItemInfo.MyPrevious.ItemID))
|
||||
// the separator must exist and the previous must have a change bar.
|
||||
|
||||
if ((sep != "") && (tmp.Text == sep) && parent.MyItemInfo.MyPrevious != null && parent.MyItemInfo.MyPrevious.HasChangeBar)
|
||||
{
|
||||
vlnParagraph prev = MyPageHelper.MyParagraphs[parent.MyItemInfo.MyPrevious.ItemID];
|
||||
float delta = parent.YOffset - prev.YOffset;
|
||||
_YOffset += delta;
|
||||
_Height += delta;
|
||||
}
|
||||
else if (parent.PartsAbove.Count > 0)
|
||||
{
|
||||
float delta = parent.YOffset - parent.PartsAbove[0].YOffset;
|
||||
_YOffset += delta;
|
||||
_Height += delta;
|
||||
if (MyPageHelper.MyParagraphs.ContainsKey(parent.MyItemInfo.MyPrevious.ItemID))
|
||||
{
|
||||
vlnParagraph prev = MyPageHelper.MyParagraphs[parent.MyItemInfo.MyPrevious.ItemID];
|
||||
float delta = parent.YOffset - prev.YOffset;
|
||||
_YOffset += delta;
|
||||
_Height += delta;
|
||||
}
|
||||
else if (parent.PartsAbove.Count > 0)
|
||||
{
|
||||
float delta = parent.YOffset - parent.PartsAbove[0].YOffset;
|
||||
_YOffset += delta;
|
||||
_Height += delta;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user