From 26a9fcba81368422295e2099cfcd4da50ff8c0d3 Mon Sep 17 00:00:00 2001 From: Rich Date: Mon, 27 Mar 2017 14:16:57 +0000 Subject: [PATCH] A bug fix for Farley was causing problems for Facing Page code. It was fixed. --- PROMS/Volian.Controls.Library/EditItem.cs | 25 +++++++++++++++-------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/PROMS/Volian.Controls.Library/EditItem.cs b/PROMS/Volian.Controls.Library/EditItem.cs index 004d7424..1b2c616c 100644 --- a/PROMS/Volian.Controls.Library/EditItem.cs +++ b/PROMS/Volian.Controls.Library/EditItem.cs @@ -578,7 +578,13 @@ 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 + // 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 { @@ -2727,12 +2733,12 @@ namespace Volian.Controls.Library ItemWidth = MyStepPanel.ToDisplay(MyStepSectionLayoutData.ColT) + MyStepPanel.ToDisplay(MyStepSectionLayoutData.WidSTableEdit, 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); + // 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; @@ -2881,8 +2887,9 @@ 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) // 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; + // RHM The following lines were commented-out for Facing Pages (Supplemental Information) to test follow the instructions + //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;