B2017-043 If the Edit Window is scrolled horizontally then new steps, cautions, notes or tables need to be located with respect to the horizontal scroll location
This commit is contained in:
parent
8b5e7e01ad
commit
6ac7897946
@ -1925,6 +1925,7 @@ namespace Volian.Controls.Library
|
|||||||
// Then should center on the wid Limit
|
// Then should center on the wid Limit
|
||||||
if (MyItemInfo.FormatStepData.Type.Contains("AER") == false && MyItemInfo.RNOLevel == 0)
|
if (MyItemInfo.FormatStepData.Type.Contains("AER") == false && MyItemInfo.RNOLevel == 0)
|
||||||
{
|
{
|
||||||
|
// B2017-043 COLR is used as a Width
|
||||||
int colR = MyStepPanel.ToDisplay(MyStepSectionLayoutData.ColRTable, MyItemInfo.ColumnMode);
|
int colR = MyStepPanel.ToDisplay(MyStepSectionLayoutData.ColRTable, MyItemInfo.ColumnMode);
|
||||||
rightLimit += colR * MyItemInfo.ColumnMode;
|
rightLimit += colR * MyItemInfo.ColumnMode;
|
||||||
center += (colR * MyItemInfo.ColumnMode) / 2;
|
center += (colR * MyItemInfo.ColumnMode) / 2;
|
||||||
@ -1935,7 +1936,8 @@ namespace Volian.Controls.Library
|
|||||||
//int x = myParentEditItem.TextLeft;
|
//int x = myParentEditItem.TextLeft;
|
||||||
int x = center - width / 2;
|
int x = center - width / 2;
|
||||||
if (x + width > rightLimit) x = rightLimit - width;
|
if (x + width > rightLimit) x = rightLimit - width;
|
||||||
int colT = MyStepPanel.ToDisplay((int)myStepSectionLayoutData.ColT);
|
// B2017-043 account for Horizontal Scroll
|
||||||
|
int colT =MyStepPanel.DisplayRectangle.X + MyStepPanel.ToDisplay((int)myStepSectionLayoutData.ColT);
|
||||||
if (x < colT) x = colT;
|
if (x < colT) x = colT;
|
||||||
int y = FindTop(myParentEditItem.Bottom);
|
int y = FindTop(myParentEditItem.Bottom);
|
||||||
return new Point(x, y);
|
return new Point(x, y);
|
||||||
@ -2630,10 +2632,12 @@ namespace Volian.Controls.Library
|
|||||||
if (ein.Bottom > ei.Bottom) ei = ein;
|
if (ein.Bottom > ei.Bottom) ei = ein;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ItemLocation = new Point(MyStepPanel.ToDisplay(MyItemInfo.ActiveFormat.MyStepSectionLayoutData.ColS) + 50, ei.Bottom);
|
// B2017-043 Account for the Horizonal Scroll position when locating the step
|
||||||
|
ItemLocation = new Point(MyStepPanel.DisplayRectangle.X + MyStepPanel.ToDisplay(MyItemInfo.ActiveFormat.MyStepSectionLayoutData.ColS) + 50, ei.Bottom);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
ItemLocation = new Point(MyStepPanel.ToDisplay(MyItemInfo.ActiveFormat.MyStepSectionLayoutData.ColS) + 50, _MyParentEditItem.Bottom);
|
// B2017-043 Account for the Horizonal Scroll position when locating the step
|
||||||
|
ItemLocation = new Point(MyStepPanel.DisplayRectangle.X + MyStepPanel.ToDisplay(MyItemInfo.ActiveFormat.MyStepSectionLayoutData.ColS) + 50, _MyParentEditItem.Bottom);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
ItemLocation = new Point(_MyParentEditItem.ItemLocation.X + 20, _MyParentEditItem.Bottom);
|
ItemLocation = new Point(_MyParentEditItem.ItemLocation.X + 20, _MyParentEditItem.Bottom);
|
||||||
@ -2805,7 +2809,8 @@ 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);
|
// B2017-043 account for Horizontal Scroll
|
||||||
|
int x = MyStepPanel.DisplayRectangle.X + MyStepPanel.ToDisplay(MyItemInfo.ActiveFormat.MyStepSectionLayoutData.ColT);
|
||||||
int y = Top;
|
int y = Top;
|
||||||
if (MyPreviousEditItem == null || !MyPreviousEditItem.MyItemInfo.IsCaution || !MyItemInfo.IsNote)
|
if (MyPreviousEditItem == null || !MyPreviousEditItem.MyItemInfo.IsCaution || !MyItemInfo.IsNote)
|
||||||
y = FindTop(myTop);
|
y = FindTop(myTop);
|
||||||
@ -2888,7 +2893,8 @@ namespace Volian.Controls.Library
|
|||||||
(MyPreviousEditItem == null || (MyPreviousEditItem.MyItemInfo.IsCaution && MyItemInfo.IsNote)))
|
(MyPreviousEditItem == null || (MyPreviousEditItem.MyItemInfo.IsCaution && MyItemInfo.IsNote)))
|
||||||
//if ((MyItemInfo.SameRowAsParent && MyItemInfo.IsCaution2) || (MyItemInfo.ActiveFormat.MyStepSectionLayoutData.Dev_Format && (MyItemInfo.IsNote || MyItemInfo.IsCaution)))
|
//if ((MyItemInfo.SameRowAsParent && MyItemInfo.IsCaution2) || (MyItemInfo.ActiveFormat.MyStepSectionLayoutData.Dev_Format && (MyItemInfo.IsNote || MyItemInfo.IsCaution)))
|
||||||
{
|
{
|
||||||
int x = MyStepPanel.ToDisplay(MyItemInfo.ActiveFormat.MyStepSectionLayoutData.ColT);
|
// B2017-043 account for Horizontal Scroll
|
||||||
|
int x = MyStepPanel.DisplayRectangle.X + MyStepPanel.ToDisplay(MyItemInfo.ActiveFormat.MyStepSectionLayoutData.ColT);
|
||||||
if (MyItemInfo.IsNote)
|
if (MyItemInfo.IsNote)
|
||||||
x += Width + 6;
|
x += Width + 6;
|
||||||
//Find first sibling
|
//Find first sibling
|
||||||
|
Loading…
x
Reference in New Issue
Block a user