- Bug Fix - Update RNO tab when AER tab is updated
- Commented-Out debug for location - Bug Fix - Cautions are now added above existing notes Bug Fix - AdjustSizeForContents - Only adjust width if text != ""
This commit is contained in:
parent
843c3fc85a
commit
ec1d6f9bd2
@ -750,7 +750,6 @@ namespace Volian.Controls.Library
|
||||
// TODO: Remove Label and just output ident on the paint event
|
||||
lblTab.Left = 20;
|
||||
SetupHeader(itemInfo);
|
||||
|
||||
this.Paint += new PaintEventHandler(StepItem_Paint);
|
||||
this.BackColorChanged += new EventHandler(StepItem_BackColorChanged);
|
||||
if (itemInfo != null)
|
||||
@ -968,7 +967,8 @@ namespace Volian.Controls.Library
|
||||
SetupHeader();
|
||||
if (_MyAfterStepItems != null) foreach (StepItem chld in _MyAfterStepItems) chld.SetAllTabs();
|
||||
if (_MyNextStepItem != null) _MyNextStepItem.SetAllTabs();
|
||||
|
||||
// Update the RNO tab if it exists - RHM 20100106
|
||||
if (_MyRNOStepItems != null) foreach (StepItem chld in _MyRNOStepItems) chld.SetAllTabs();
|
||||
}
|
||||
/// <summary>
|
||||
/// Add the next item to a list
|
||||
@ -996,7 +996,7 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
MyStepPanel.SelectedStepRTB = null; // Unselect the item to be deleted
|
||||
StepItem newFocus = null;
|
||||
ShowTops("\r\n");
|
||||
//ShowTops("\r\n");
|
||||
int TopMostYBefore = TopMostStepItem.Top;
|
||||
int? TopMostParentY = (MyParentStepItem == null ? null : (int?)(MyParentStepItem.TopMostStepItem.Top));
|
||||
int? ParentY = (MyParentStepItem == null ? null : (int?)(MyParentStepItem.Top));
|
||||
@ -1018,7 +1018,7 @@ namespace Volian.Controls.Library
|
||||
MyNextStepItem.MyPreviousStepItem = MyPreviousStepItem;
|
||||
MyPreviousStepItem = null;
|
||||
newFocus = MyNextStepItem;
|
||||
Console.Write(",\"Next 1\",");
|
||||
//Console.Write(",\"Next 1\",");
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1026,7 +1026,7 @@ namespace Volian.Controls.Library
|
||||
MyParentStepItem = null;
|
||||
MyNextStepItem.MyPreviousStepItem = null;
|
||||
newFocus = MyNextStepItem;
|
||||
Console.Write(",\"Next 2\",");
|
||||
//Console.Write(",\"Next 2\",");
|
||||
}
|
||||
MyNextStepItem = null;
|
||||
}
|
||||
@ -1035,13 +1035,13 @@ namespace Volian.Controls.Library
|
||||
MyPreviousStepItem.MyNextStepItem = null;
|
||||
newFocus = MyPreviousStepItem;
|
||||
MyPreviousStepItem = null;
|
||||
Console.Write(",\"Previous\",");
|
||||
//Console.Write(",\"Previous\",");
|
||||
}
|
||||
else
|
||||
{
|
||||
newFocus = MyParentStepItem;
|
||||
MyParentStepItem = null;
|
||||
Console.Write(",\"Parent\",");
|
||||
//Console.Write(",\"Parent\",");
|
||||
}
|
||||
newFocus.MyStepRTB.Focus();
|
||||
Dispose();
|
||||
@ -1050,7 +1050,7 @@ namespace Volian.Controls.Library
|
||||
if (TopMostYAfter > TopMostYBefore)
|
||||
newFocus.TopMostStepItem.Top = TopMostYBefore;
|
||||
newFocus.AdjustLocation();
|
||||
newFocus.ShowTops("");
|
||||
//newFocus.ShowTops("");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1275,7 +1275,14 @@ namespace Volian.Controls.Library
|
||||
_WatchThis = 1;
|
||||
ItemInfo newItemInfo = MyItemInfo.InsertChild(fromType, type, text);
|
||||
// TODO: We need to determine where this will go in the stack of children
|
||||
StepItem nextItem = MyStepPanel.FindItem(newItemInfo.NextItem);
|
||||
StepItem nextItem = null;
|
||||
if(newItemInfo.NextItem != null)
|
||||
nextItem = MyStepPanel.FindItem(newItemInfo.NextItem);
|
||||
// Cautions come before notes, so if this is a Caution and there are Notes, put this first
|
||||
else if(fromType == E_FromType.Caution && ((ItemInfo)newItemInfo.ActiveParent).Notes != null
|
||||
&& ((ItemInfo)newItemInfo.ActiveParent).Notes.Count > 0)
|
||||
nextItem = MyStepPanel.FindItem(((ItemInfo)newItemInfo.ActiveParent).Notes[0]);
|
||||
// TODO: May need similar logic if a Table is being added to a step that has substeps
|
||||
StepItem newStepItem;
|
||||
switch (fromType)
|
||||
{
|
||||
@ -1397,7 +1404,7 @@ namespace Volian.Controls.Library
|
||||
/// <param name="e"></param>
|
||||
private void StepItem_Resize(object sender, EventArgs e)
|
||||
{
|
||||
ShowMe("Resize");
|
||||
//ShowMe("Resize");
|
||||
if (MyStepRTB.Text.EndsWith("\n"))
|
||||
if (!_LookForID.Contains(MyID))
|
||||
{
|
||||
@ -1442,7 +1449,7 @@ namespace Volian.Controls.Library
|
||||
//vlnStackTrace.ScrollInStack();
|
||||
return; // If 0 - Indicates scrolling which requires no action.
|
||||
}
|
||||
ShowMe("Move");
|
||||
//ShowMe("Move");
|
||||
if (_MyItemInfo == null)
|
||||
return;
|
||||
//if (_WatchThis > 0 && MyID > _StartingID)
|
||||
|
@ -342,7 +342,7 @@ namespace Volian.Controls.Library
|
||||
public StepRTB()
|
||||
{
|
||||
InitializeComponent();
|
||||
SetUp();
|
||||
SetUpStepRTB();
|
||||
AddEventHandlers();
|
||||
}
|
||||
public StepRTB(IContainer container)
|
||||
@ -350,7 +350,7 @@ namespace Volian.Controls.Library
|
||||
container.Add(this);
|
||||
InitializeComponent();
|
||||
_Container = container;
|
||||
SetUp();
|
||||
SetUpStepRTB();
|
||||
AddEventHandlers();
|
||||
}
|
||||
protected override void OnMouseWheel(MouseEventArgs e)
|
||||
@ -386,7 +386,7 @@ namespace Volian.Controls.Library
|
||||
this.MouseLeave += new EventHandler(StepRTB_MouseLeave);
|
||||
this.SelectionChanged +=new EventHandler(StepRTB_SelectionChanged);
|
||||
}
|
||||
private void SetUp()
|
||||
private void SetUpStepRTB()
|
||||
{
|
||||
this.Height = 10; // initialize the height to 10, the default height was too big for the cells in grid tables
|
||||
BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
@ -808,7 +808,8 @@ namespace Volian.Controls.Library
|
||||
Size offset = Size - ClientSize;
|
||||
int widthNew = ContentsSize.Width + offset.Width + AdjustSize.Width ;
|
||||
int heightNew = ContentsSize.Height + offset.Height + AdjustSize.Height;
|
||||
Size szNew = new Size((adjustWidth ? widthNew : (widthNew > Width ? widthNew : Width)), heightNew);
|
||||
// Don't make the window narrower unless it has text - RHM - 20100107
|
||||
Size szNew = new Size(((Text != "" && adjustWidth) ? widthNew : (widthNew > Width ? widthNew : Width)), heightNew);
|
||||
if (this.Size != szNew)
|
||||
{
|
||||
this.Size = szNew;
|
||||
|
Loading…
x
Reference in New Issue
Block a user