A bug fix for Farley was causing problems for Facing Page code. It was fixed.

This commit is contained in:
Rich 2017-03-27 14:16:57 +00:00
parent 6ac7897946
commit 26a9fcba81

View File

@ -578,7 +578,13 @@ namespace Volian.Controls.Library
EditItem lastChild = LastChild(siblingEditItems); EditItem lastChild = LastChild(siblingEditItems);
siblingEditItems.Add(this); siblingEditItems.Add(this);
MyPreviousEditItem = lastChild; MyPreviousEditItem = lastChild;
MyParentEditItem = MyPreviousEditItem.MyParentEditItem; // Farley - part of bug fix B2015-123 alignment of tabs on the edit screen // RHM - The following line was remove for Facing Pages (Supplemental Information)
// *******************************************************************************
// When MyPreviousEditItem is set, the location and size is set as a side-effect.
// When MyParentEditItem is set, the location and size is set as a side effect.
// Only Previous or Parent should be set, no both.
// *******************************************************************************
//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 else // Add to the middle of the list before a particular item
{ {
@ -2727,12 +2733,12 @@ namespace Volian.Controls.Library
ItemWidth = MyStepPanel.ToDisplay(MyStepSectionLayoutData.ColT) + MyStepPanel.ToDisplay(MyStepSectionLayoutData.WidSTableEdit, 0); ItemWidth = MyStepPanel.ToDisplay(MyStepSectionLayoutData.ColT) + MyStepPanel.ToDisplay(MyStepSectionLayoutData.WidSTableEdit, 0);
else if (MyItemInfo.MyTab != null && 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) // Farley - part of bug fix B2015-123 alignment of tabs on the edit screen (Farly is only one using tab offset)
ContentWidth = _MyParentEditItem.ContentWidth; ContentWidth = _MyParentEditItem.ContentWidth;
int xOffTabNew = (MyItemInfo.MyParent.MyTab != null ? MyItemInfo.MyParent.MyTab.Offset : MyItemInfo.MyParent.OffsetTab) + MyItemInfo.MyTab.Offset; 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; xOffTabNew += MyItemInfo.MyParent.MyTab == null ? 0 : MyItemInfo.MyParent.MyTab.Offset;
int xIncrement = xOffTabNew - MyItemInfo.MyTab.Offset; int xIncrement = xOffTabNew - MyItemInfo.MyTab.Offset;
MyStepRTB.Location = new Point(MyStepRTB.Location.X + xIncrement, MyStepRTB.Location.Y); MyStepRTB.Location = new Point(MyStepRTB.Location.X + xIncrement, MyStepRTB.Location.Y);
} }
else else
ItemWidth = _MyParentEditItem.ContentWidth; ItemWidth = _MyParentEditItem.ContentWidth;
@ -2881,8 +2887,9 @@ namespace Volian.Controls.Library
} }
else if (MyPreviousEditItem != null && MyPreviousEditItem.MyItemInfo.FormatStepData != null && MyPreviousEditItem.MyItemInfo.FormatStepData.ReadOnly) else if (MyPreviousEditItem != null && MyPreviousEditItem.MyItemInfo.FormatStepData != null && MyPreviousEditItem.MyItemInfo.FormatStepData.ReadOnly)
ItemWidth = MyStepPanel.ToDisplay(MyStepSectionLayoutData.ColT) + MyStepPanel.ToDisplay(MyStepSectionLayoutData.WidSTableEdit, 0); ItemWidth = MyStepPanel.ToDisplay(MyStepSectionLayoutData.ColT) + MyStepPanel.ToDisplay(MyStepSectionLayoutData.WidSTableEdit, 0);
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) // RHM The following lines were commented-out for Facing Pages (Supplemental Information) to test follow the instructions
ContentWidth = (MyPreviousEditItem.MyItemInfo.MyTab.Offset != 0) ? MyPreviousEditItem.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 else
Width = MyPreviousEditItem.Width; Width = MyPreviousEditItem.Width;