diff --git a/PROMS/Volian.Controls.Library/StepItem.cs b/PROMS/Volian.Controls.Library/StepItem.cs index a1029eda..b8aaa154 100644 --- a/PROMS/Volian.Controls.Library/StepItem.cs +++ b/PROMS/Volian.Controls.Library/StepItem.cs @@ -218,7 +218,10 @@ namespace Volian.Controls.Library ItemWidth = _MyStepPanel.ToDisplay(_MyStepSectionLayoutData.ColT) + _MyStepPanel.ToDisplay(_MyStepSectionLayoutData.WidT); break; case 1: // Section - ItemLocation = new Point(_MyParentStepItem.ItemLocation.X + 20, _MyParentStepItem.Bottom); + if(this == TopMostStepItem) + ItemLocation = new Point(_MyParentStepItem.ItemLocation.X + 20, _MyParentStepItem.Bottom); + else + TopMostStepItem.ItemLocation = new Point(TopMostStepItem.ItemLocation.X, _MyParentStepItem.Bottom); int borderWidth = _MyStepRTB.Width - _MyStepRTB.ClientRectangle.Width; //TextWidth = _WidthAdjust + borderWidth + _MyStepPanel.ToDisplay(_MyStepSectionLayoutData.WidSTableEdit, Convert.ToInt32(_MyStepSectionLayoutData.PMode) - 1); TextWidth = _WidthAdjust + borderWidth + _MyStepPanel.ToDisplay(_MyStepSectionLayoutData.WidSTableEdit, MyItemInfo.ColumnMode); @@ -465,7 +468,10 @@ namespace Volian.Controls.Library else { Width = MyPreviousStepItem.Width; - Location = new Point(_MyPreviousStepItem.Left, FindTop(_MyPreviousStepItem.BottomMostStepItem.Bottom)); + if (TopMostStepItem == this) + Location = new Point(_MyPreviousStepItem.Left, FindTop(_MyPreviousStepItem.BottomMostStepItem.Bottom)); + else + TopMostStepItem.Location = new Point(TopMostStepItem.Left, FindTop(_MyPreviousStepItem.BottomMostStepItem.Bottom)); } _IgnoreResize=false; //ShowMe(""); @@ -1027,7 +1033,6 @@ namespace Volian.Controls.Library MyNextStepItem.MyPreviousStepItem = MyPreviousStepItem; MyPreviousStepItem = null; newFocus = MyNextStepItem; - //Console.Write(",\"Next 1\","); } else { @@ -1035,8 +1040,9 @@ namespace Volian.Controls.Library MyParentStepItem = null; MyNextStepItem.MyPreviousStepItem = null; newFocus = MyNextStepItem; - //Console.Write(",\"Next 2\","); - } + } + // Adjust the vertical locations of all of the items below the item deleted + MyNextStepItem.TopMostStepItem.AdjustLocation(); MyNextStepItem = null; } else if (MyPreviousStepItem != null) @@ -2336,7 +2342,7 @@ namespace Volian.Controls.Library } public override string ToString() { - return _MyItemInfo == null ? base.ToString() : string.Format("({0}) {1}", MyID, MyPath); // + "-" + MyItemInfo.MyContent.Text; + return _MyItemInfo == null ? base.ToString() : string.Format("{0},'{1}'", MyID, MyPath); // + "-" + MyItemInfo.MyContent.Text; } #endregion }