B2017-037 Added logic to the V button dialog so that the New button will be grayed out when on a RNO step type. Also added logic to sync the procedure tree selection with the current edit window in the step editor.

This commit is contained in:
John Jenko 2018-02-08 20:28:37 +00:00
parent 30ad494f35
commit 3f12433da9

View File

@ -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