Reverted the first transition type back to not allowing the user to select a section

Fixed the transition logic so that the first transition type can be when the procedure you are transiting to does not have a default section named “Procedure Steps”.
This commit is contained in:
John Jenko 2014-11-06 20:59:22 +00:00
parent fd6e80ef71
commit b52c7098f9
2 changed files with 5 additions and 1 deletions

Binary file not shown.

View File

@ -1017,7 +1017,11 @@ namespace Volian.Controls.Library
toItem = (ItemInfo)vtn.VEObject;
}
else
{
toItem = (ItemInfo)cbTranSects.SelectedItem; // didn't select a step.
if (toItem == null)
toItem = (ItemInfo)cbTranProcs.SelectedItem;
}
if (toItem != null) // this will be null if transition is to a an empty procedure set (sections but no steps)
linktxt = string.Format("#Link:Transition:{0} <NewID> {1}", listBoxTranFmt.SelectedIndex, toItem.ItemID);
}
@ -1029,7 +1033,7 @@ namespace Volian.Controls.Library
else
{
VETreeNode vtn = (VETreeNode)tvTran.SelectedNode;
if (vtn.Tag == null) toItem = (ItemInfo)cbTranSects.SelectedItem;
if (vtn == null || vtn.Tag == null) toItem = (ItemInfo)cbTranSects.SelectedItem;
else toItem = (ItemInfo)vtn.VEObject;
}
if (toItem==null)