BGE: Fix RNO tab when AER has ending parenthesis
BGE: Fix bug that left a ‘page number’ transition setting turned on for transition types that did not have this option. BGE: Support for section continue messages (fix crash when access of null pointer), improved tabs for top continue messages in RNO column & when cautions/notes; adjust width of note/caution
This commit is contained in:
@@ -1129,12 +1129,22 @@ namespace Volian.Print.Library
|
||||
yPageStart -= 2 * SixLinesPerInch;// Allow two lines for top continue message
|
||||
if (myMsg.IndexOf(@"%sR") > -1)
|
||||
{
|
||||
if (MyItemInfo.ItemID == 461 || MyItemInfo.ItemID == 446) Console.WriteLine("Here");
|
||||
ItemInfo myAer = MyItemInfo.IsHigh ? MyItemInfo : MyItemInfo.MyParent;
|
||||
if (MyItemInfo.IsInRNO)
|
||||
{
|
||||
if (MyItemInfo.IsNote || MyItemInfo.IsCaution)
|
||||
myMsg = myMsg.Replace(@"%sR", MyItemInfo.MyParent.MyParent.CombinedTab);
|
||||
// If this is an RNO part, find the parent that is not an RNO (the reason for this is
|
||||
// that RNO parts are structured as parent/child not sibling relationships, for
|
||||
// example, RNO part 1.2 is the child of 1.1 not sibling). Also, if this is a caution
|
||||
// or note of the RNO part, do the same because it should not use the RNO part's tab.
|
||||
// However, the RNO Part will have the combined tab using its parent because this is
|
||||
// needed if any of its children, for example substeps, need the combined tab.
|
||||
if (((MyItemInfo.IsNote || MyItemInfo.IsCaution) && MyItemInfo.MyParent.IsRNOPart) || MyItemInfo.IsRNOPart)
|
||||
{
|
||||
ItemInfo ip = MyItemInfo.MyParent;
|
||||
while (ip.IsRNOPart) ip = ip.MyParent;
|
||||
myMsg = myMsg.Replace(@"%sR", ip.CombinedTab);
|
||||
}
|
||||
|
||||
else
|
||||
myMsg = myMsg.Replace(@"%sR", MyItemInfo.MyParent.CombinedTab);
|
||||
float xor = MyTopRNO.MyTab.XOffset;
|
||||
@@ -1143,6 +1153,11 @@ namespace Volian.Print.Library
|
||||
myAer = MyItemInfo;
|
||||
while (myAer.IsInRNO) myAer = myAer.MyParent;
|
||||
}
|
||||
else if (!MyItemInfo.IsHigh && (MyItemInfo.IsNote || MyItemInfo.IsCaution))
|
||||
{
|
||||
ItemInfo ip1 = MyItemInfo.MyParent;
|
||||
if (!ip1.IsHigh) myAer = ip1.MyParent;
|
||||
}
|
||||
myMsg = docstyle.Continue.Top.Message.Replace(@"%sR", myAer.CombinedTab);
|
||||
}
|
||||
if (myMsg.IndexOf(@"%s") > -1)
|
||||
@@ -1225,7 +1240,7 @@ namespace Volian.Print.Library
|
||||
break;
|
||||
case E_ContBottomLoc.BtwnTextAndBottom2:
|
||||
// Like BtwnTextAndBottom but accounts for line spacing of step & is 1 line up on page (for BGE - Procedure Steps - 2 column)
|
||||
float adj = (MyItemInfo.FormatStepData.StepLayoutData.EveryNLines == 1) ? SixLinesPerInch : 0;
|
||||
float adj = (!MyItemInfo.IsSection && MyItemInfo.FormatStepData.StepLayoutData.EveryNLines == 1) ? SixLinesPerInch : 0;
|
||||
msg_yLocation = msg_yLocation + yLocation - ((yLocation - yBottomMargin) / 2) + adj + SixLinesPerInch;
|
||||
if (msg_yLocation < yBottomMargin) msg_yLocation = yBottomMargin;
|
||||
break;
|
||||
@@ -1278,7 +1293,11 @@ namespace Volian.Print.Library
|
||||
|
||||
private string ReplaceStepBottomContinue(string myMsg)
|
||||
{
|
||||
string tb = MyItemInfo.MyHLS.MyTab.CleanTextNoSymbols;
|
||||
string tb = null;
|
||||
if (MyItemInfo.IsSection)
|
||||
tb = MyItemInfo.MyTab.CleanText.Trim();
|
||||
else
|
||||
tb = MyItemInfo.MyHLS.MyTab.CleanTextNoSymbols;
|
||||
// if the tab ends with .0, remove it if it was added because of the virtualdotinhls flag.
|
||||
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.VirtualDotInHLSTab && tb.Contains(".0")) tb = tb.Replace(".0", "");
|
||||
if (myMsg.IndexOf(@"%d") > -1)
|
||||
@@ -1719,7 +1738,7 @@ namespace Volian.Print.Library
|
||||
else
|
||||
{
|
||||
XOffset = MyHighLevelParagraph.MyTab.XOffset;
|
||||
Width = MyHighLevelParagraph.MyTab.Width + MyHighLevelParagraph.Width;
|
||||
Width = MyHighLevelParagraph.MyTab.Width + MyHighLevelParagraph.Width - 6; // make width 1/2 char smaller so it doesn't touch line
|
||||
}
|
||||
}
|
||||
if (UseTemplateWidthOrXOff(itemInfo)) XOffset = (float)itemInfo.MyDocStyle.Layout.LeftMargin + GetWidthOrStartFromTemplate(itemInfo, itemInfo.ActiveFormat, false);
|
||||
@@ -3145,7 +3164,9 @@ namespace Volian.Print.Library
|
||||
}
|
||||
else if (itemInfo.IsRNOPart && itemInfo.MyParent != null && itemInfo.MyParent.IsRNOPart && itemInfo.FormatStepData.NumberWithLevel)
|
||||
{
|
||||
// xoffset is same as parent RNO (this is a BGE format flag)
|
||||
// xoffset is same as parent RNO (this is a BGE format flag). Instead of RNO's being siblings,
|
||||
// they had a parent/child relationship. So want the child to have same xoffset as parent, i.e.
|
||||
// the same xoffset.
|
||||
XOffset = MyParent.XOffset;
|
||||
myTab.XOffset = MyParent.MyTab.XOffset;
|
||||
return;
|
||||
|
Reference in New Issue
Block a user