Fixed a null reference error that happened when a step was deleted from the tree. B2016-105
Adding a new step from the section node in a tree will now consistently add the new step at the beginning of that section – whether the procedure editor is open or not. – B2016-002
This commit is contained in:
@@ -2708,12 +2708,18 @@ namespace Volian.Controls.Library
|
||||
else
|
||||
{
|
||||
// The parent step was not open in the step editor, just create new step and add treenode.
|
||||
using (Step step = Step.MakeStep(_LastItemInfo, _LastItemInfo.LastChild(E_FromType.Step), null, "New Step", 20002, E_FromType.Step))
|
||||
// this line (below) adds the new step to the bottom of the section, the other line (not commented) adds it to the top. Bug fix B2016-002
|
||||
//using (Step step = Step.MakeStep(_LastItemInfo, _LastItemInfo.LastChild(E_FromType.Step), null, "New Step", 20002, E_FromType.Step))
|
||||
using (Step step = Step.MakeStep(_LastItemInfo, null , null, "New Step", 20002, E_FromType.Step))
|
||||
{
|
||||
ShowBrokenRules(step.BrokenRulesCollection);
|
||||
SetLastValues(StepInfo.Get(step.ItemID));
|
||||
tn = new VETreeNode(_LastStepInfo);
|
||||
SelectedNode.Nodes.Add(tn); // add tree node to end of list.
|
||||
//SelectedNode.Nodes.Add(tn); // add tree node to end of list.
|
||||
_LastStepInfo.UpdateTransitionText();
|
||||
_LastStepInfo.UpdateROText();
|
||||
TreeNode par = SelectedNode;
|
||||
par.Nodes.Insert(0, tn);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user