diff --git a/PROMS/Volian.Controls.Library/EditItem.cs b/PROMS/Volian.Controls.Library/EditItem.cs index 3b694614..bf003e1c 100644 --- a/PROMS/Volian.Controls.Library/EditItem.cs +++ b/PROMS/Volian.Controls.Library/EditItem.cs @@ -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; diff --git a/PROMS/Volian.Controls.Library/RTBItem.cs b/PROMS/Volian.Controls.Library/RTBItem.cs index c7394228..85d8cd69 100644 --- a/PROMS/Volian.Controls.Library/RTBItem.cs +++ b/PROMS/Volian.Controls.Library/RTBItem.cs @@ -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