Added a check for null references in the logic that builds the context menu. We were getting an error when you right clicked on a “Steps” or “Sections” tree node for procedures with sub-sections.
This commit is contained in:
@@ -826,7 +826,7 @@ namespace Volian.Controls.Library
|
||||
#region Menu_Properties
|
||||
// Add Properties to the menu unless at the very 'top' node or on a grouping (partinfo)
|
||||
// node (RNOs, Steps, Cautions, Notes) or at the step level.
|
||||
ok = tn.VEObject as FolderInfo != null ? ui.IsAdministrator() : tn.VEObject as DocVersionInfo != null ? (ui.IsAdministrator() || ui.IsSetAdministrator(tn.VEObject as DocVersionInfo)) : (ui.IsAdministrator() || ui.IsSetAdministrator((tn.VEObject as ItemInfo).MyProcedure.MyDocVersion) || ui.IsWriter((tn.VEObject as ItemInfo).MyProcedure.MyDocVersion));
|
||||
ok = tn.VEObject as FolderInfo != null ? ui.IsAdministrator() : tn.VEObject as DocVersionInfo != null ? (ui.IsAdministrator() || ui.IsSetAdministrator(tn.VEObject as DocVersionInfo)) : (ui.IsAdministrator() || ((tn.VEObject as ItemInfo) != null && (ui.IsSetAdministrator((tn.VEObject as ItemInfo).MyProcedure.MyDocVersion) || ui.IsWriter((tn.VEObject as ItemInfo).MyProcedure.MyDocVersion))));
|
||||
PartInfo pia = tn.VEObject as PartInfo;
|
||||
ItemInfo ii = tn.VEObject as ItemInfo;
|
||||
if (ok)
|
||||
|
Reference in New Issue
Block a user