RNO tabs cut off on the edit screen B2015-123

This commit is contained in:
John Jenko 2016-10-10 18:47:02 +00:00
parent f6ecb98bc8
commit 146073dcb8
2 changed files with 12 additions and 4 deletions

View File

@ -578,6 +578,7 @@ namespace Volian.Controls.Library
EditItem lastChild = LastChild(siblingEditItems);
siblingEditItems.Add(this);
MyPreviousEditItem = lastChild;
MyParentEditItem = MyPreviousEditItem.MyParentEditItem; // Farley - part of bug fix B2015-123 alignment of tabs on the edit screen
}
else // Add to the middle of the list before a particular item
{
@ -2562,8 +2563,15 @@ namespace Volian.Controls.Library
}
else if (MyParentEditItem != null && MyParentEditItem.MyItemInfo.FormatStepData.ReadOnly)
ItemWidth = MyStepPanel.ToDisplay(MyStepSectionLayoutData.ColT) + MyStepPanel.ToDisplay(MyStepSectionLayoutData.WidSTableEdit, 0);
else if (MyItemInfo.MyTab.Offset != 0)
else if (MyItemInfo.MyTab != null && MyItemInfo.MyTab.Offset != 0)
{
// Farley - part of bug fix B2015-123 alignment of tabs on the edit screen (Farly is only one using tab offset)
ContentWidth = _MyParentEditItem.ContentWidth;
int xOffTabNew = (MyItemInfo.MyParent.MyTab != null ? MyItemInfo.MyParent.MyTab.Offset : MyItemInfo.MyParent.OffsetTab) + MyItemInfo.MyTab.Offset;
xOffTabNew += MyItemInfo.MyParent.MyTab == null ? 0 : MyItemInfo.MyParent.MyTab.Offset;
int xIncrement = xOffTabNew - MyItemInfo.MyTab.Offset;
MyStepRTB.Location = new Point(MyStepRTB.Location.X + xIncrement, MyStepRTB.Location.Y);
}
else
ItemWidth = _MyParentEditItem.ContentWidth;
}
@ -2704,8 +2712,8 @@ namespace Volian.Controls.Library
}
else if (MyPreviousEditItem != null && MyPreviousEditItem.MyItemInfo.FormatStepData != null && MyPreviousEditItem.MyItemInfo.FormatStepData.ReadOnly)
ItemWidth = MyStepPanel.ToDisplay(MyStepSectionLayoutData.ColT) + MyStepPanel.ToDisplay(MyStepSectionLayoutData.WidSTableEdit, 0);
else if (MyItemInfo.MyTab.Offset != 0)
ContentWidth = MyPreviousEditItem.ContentWidth+10;
else if (MyItemInfo.MyTab.Offset != 0) // Farley - part of bug fix B2015-123 alignment of tabs on the edit screen (Farly is only one using tab offset)
ContentWidth = (MyPreviousEditItem.MyItemInfo.MyTab.Offset != 0) ? MyPreviousEditItem.ContentWidth : MyPreviousEditItem.ContentWidth + 10;
else
Width = MyPreviousEditItem.Width;

View File

@ -173,7 +173,7 @@ namespace Volian.Controls.Library
bool lastDigitSingle = Regex.IsMatch(tabString, "^.*[^0-9][0-9] *$");
lblTab.Width = ((lastDigitSingle ? 1 : 0) + tabString.Length) * MyStepPanel.DPI / cpi;
Invalidate();
if (MyItemInfo.MyTab.Offset == 0)
//if (MyItemInfo.MyTab.Offset == 0) // commented out for Farley bug fix B2015-123 alignment of tabs on the edit screen (Farly is only one using tab offset)
{
// In the following if statement, the last part, 'IsHigh & PageBreakOnStep' (PageBreakOnStep
// flags background steps and IsHigh is for the HLS - Cautions/Notes were ok), was added