diff --git a/PROMS/VEPROMS User Interface/frmVEPROMS.cs b/PROMS/VEPROMS User Interface/frmVEPROMS.cs index dc4e5bb7..64fba047 100644 --- a/PROMS/VEPROMS User Interface/frmVEPROMS.cs +++ b/PROMS/VEPROMS User Interface/frmVEPROMS.cs @@ -3462,10 +3462,14 @@ namespace VEPROMS // reset in case previous selection changed items. btnNew.SubItems.Clear(); btnNew.Enabled = false; - - VETreeNode vtn = tv.SelectedNode as VETreeNode; + // if focus is in the step editor, position in the tree view to match the location in the step editor + if (!tv.Focused && tc.SelectedDisplayTabItem != null && tc.SelectedDisplayTabItem.SelectedItemInfo != null) + tv.AdjustTree(tc.SelectedDisplayTabItem.SelectedItemInfo); + VETreeNode vtn = tv.SelectedNode as VETreeNode; if (vtn == null) return; - btnNew.Enabled = true; + StepInfo stpinf = vtn.VEObject as StepInfo; + if (stpinf == null || !stpinf.IsRNOPart) //B2017-037 is this a RNO step type element - don't allow insert before/after + btnNew.Enabled = true; vtn.Expand(); // Folders can have either folders & docversions, but