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

This commit is contained in:
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))
{
int x = MyStepPanel.ToDisplay(MyItemInfo.ActiveFormat.MyStepSectionLayoutData.ColT);
//if (MyItemInfo.ItemID == 1 || MyItemInfo.ItemID == 52)
// Console.WriteLine("here");
int y = FindTop(myTop);
// 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)
x += Width + 6;
Location = new Point(x, FindTop(myTop));
Location = new Point(x, y);
}
else
Location = new Point(_MyParentEditItem.Left + 20, FindTop(myTop));