This commit is contained in:
parent
707852a033
commit
d01b27c80d
@ -437,10 +437,19 @@ namespace Volian.Controls.Library
|
||||
#endregion
|
||||
Menu_Paste(tn, cm);
|
||||
#region Menu_Delete
|
||||
// Add delete to the menu unless at the very 'top' node or on a grouping (partinfo)
|
||||
// node (RNOs, Steps, Cautions, Notes)
|
||||
// Add delete to the menu unless at the very 'top' node, on a grouping (partinfo)
|
||||
// node (RNOs, Steps, Cautions, Notes) or Folder/DocVersion that contains any items.
|
||||
PartInfo pi = tn.VEObject as PartInfo;
|
||||
if (pi == null && tn.Parent!=null) cm.MenuItems.Add("Delete", new EventHandler(mi_Click));
|
||||
if (pi == null && tn.Parent != null) // it's not a part and it's not the top....
|
||||
{
|
||||
FolderInfo fi = tn.VEObject as FolderInfo;
|
||||
if (fi == null || tn.Nodes.Count == 0) // it's not a folder or it has no children
|
||||
{
|
||||
DocVersionInfo di = tn.VEObject as DocVersionInfo;
|
||||
if (di == null || tn.Nodes.Count == 0) // it's not a docversion or it has no children
|
||||
cm.MenuItems.Add("Delete", new EventHandler(mi_Click));
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region Menu_Properties
|
||||
// Add Properties to the menu unless at the very 'top' node or on a grouping (partinfo)
|
||||
|
Loading…
x
Reference in New Issue
Block a user