diff --git a/PROMS/Volian.Controls.Library/StepItem.cs b/PROMS/Volian.Controls.Library/StepItem.cs index be177fff..7fad86ef 100644 --- a/PROMS/Volian.Controls.Library/StepItem.cs +++ b/PROMS/Volian.Controls.Library/StepItem.cs @@ -1390,6 +1390,10 @@ namespace Volian.Controls.Library } public StepItem PasteReplace(int copyStartID) { + // To allow a Paste Step into an empty (new) step/substep, we need to add a character to the the Text field + // to simulate replacing an existing step - otherwise we will get null references. + if (MyStepPanel.SelectedStepRTB.Text == "") + MyStepPanel.SelectedStepRTB.Text = " "; MyStepPanel.SelectedStepRTB = null; // Unselect the item to be deleted ChildRelation childRelation = _MyChildRelation; StepItem newFocus = null;