Fixed placement of ERG step number (Note) on Deviation Documents

This commit is contained in:
John Jenko 2014-03-06 22:22:08 +00:00
parent a5790a4963
commit 0a4ed797b8
2 changed files with 22 additions and 4 deletions

View File

@ -2201,11 +2201,19 @@ namespace Volian.Controls.Library
if (MyItemInfo.ActiveFormat.MyStepSectionLayoutData.Dev_Format && (MyItemInfo.IsCaution || MyItemInfo.IsNote)) if (MyItemInfo.ActiveFormat.MyStepSectionLayoutData.Dev_Format && (MyItemInfo.IsCaution || MyItemInfo.IsNote))
{ {
int x = MyStepPanel.ToDisplay(MyItemInfo.ActiveFormat.MyStepSectionLayoutData.ColT); int x = MyStepPanel.ToDisplay(MyItemInfo.ActiveFormat.MyStepSectionLayoutData.ColT);
//if (MyItemInfo.ItemID == 1 || MyItemInfo.ItemID == 52) int y = FindTop(myTop);
// Console.WriteLine("here"); // Get the "bottom" number of the longest Caution/Note on the step/substep above so that
// we can position properly on the screen.
// EX. Catawba Deviations E-1 step deviation for step 10
EditItem eitm = (MyParentEditItem.MyPreviousEditItem != null) ? MyParentEditItem.MyPreviousEditItem : MyParentEditItem.MyParentEditItem;
if (eitm != null && eitm.MyBeforeEditItems != null)
{
foreach (EditItem eitmTmp in eitm.MyBeforeEditItems)
y = Math.Max(y, eitmTmp.Bottom);
}
if(MyItemInfo.IsNote) if(MyItemInfo.IsNote)
x += Width + 6; x += Width + 6;
Location = new Point(x, FindTop(myTop)); Location = new Point(x, y);
} }
else else
Location = new Point(_MyParentEditItem.Left + 20, FindTop(myTop)); Location = new Point(_MyParentEditItem.Left + 20, FindTop(myTop));

View File

@ -1589,14 +1589,24 @@ namespace Volian.Print.Library
if (itemInfo.Cautions != null && !(itemInfo.IsCaution || itemInfo.IsNote)) if (itemInfo.Cautions != null && !(itemInfo.IsCaution || itemInfo.IsNote))
{ {
if (itemInfo.ActiveFormat.MyStepSectionLayoutData.Dev_Format) if (itemInfo.ActiveFormat.MyStepSectionLayoutData.Dev_Format)
{
// For deviations, the Cautions are always in the same place.
// Fix for Catawba E-1 deviation for step 10. Has note/caution off of a paragraph instead of HLS
float xoffDev = (float)itemInfo.MyDocStyle.Layout.LeftMargin;
yoffLeft = ChildrenLeft.Add(cb, itemInfo.Cautions, xoff, yoff, yoff, rnoLevel, maxRNO, formatInfo); yoffLeft = ChildrenLeft.Add(cb, itemInfo.Cautions, xoff, yoff, yoff, rnoLevel, maxRNO, formatInfo);
}
else else
yoff = ChildrenAbove.Add(cb, itemInfo.Cautions, xoff, yoff, yoff, rnoLevel, maxRNO, formatInfo); yoff = ChildrenAbove.Add(cb, itemInfo.Cautions, xoff, yoff, yoff, rnoLevel, maxRNO, formatInfo);
} }
if (itemInfo.Notes != null && !(itemInfo.IsCaution || itemInfo.IsNote)) if (itemInfo.Notes != null && !(itemInfo.IsCaution || itemInfo.IsNote))
{ {
if (itemInfo.ActiveFormat.MyStepSectionLayoutData.Dev_Format) if (itemInfo.ActiveFormat.MyStepSectionLayoutData.Dev_Format)
yoffLeft = Math.Max(yoffLeft, ChildrenLeft.Add(cb, itemInfo.Notes, xoff + 6 + (float)(itemInfo.ActiveFormat.MyStepSectionLayoutData.WidT), yoff, yoff, rnoLevel, maxRNO, formatInfo)); {
// For deviations, the Cautions are always in the same place.
// Fix for Catawba E-1 deviation for step 10. Has note/caution off of a paragraph instead of HLS
float xoffDev = (float)itemInfo.MyDocStyle.Layout.LeftMargin + 6 + (float)(itemInfo.ActiveFormat.MyStepSectionLayoutData.WidT);
yoffLeft = Math.Max(yoffLeft, ChildrenLeft.Add(cb, itemInfo.Notes, xoffDev, yoff, yoff, rnoLevel, maxRNO, formatInfo));
}
else else
{ {
// Notes/Cautions span the page. If the right (RNO) column is below current yoff, use the // Notes/Cautions span the page. If the right (RNO) column is below current yoff, use the