Added logic to protect against failures when an invalid transition text is removed.

Added logic to protect against failures when an invalid transition text is selected.
This commit is contained in:
Rich committed 2013-07-03 15:58:12 +00:00
1 parent 76710282b4
commit aace632c9b
2 files changed
+6

No files matched your search

@@ -497,6 +497,9 @@ namespace VEPROMS.CSLA.Library
}
private static string BuildString(TransitionBuilder tb)
{
//Invalid Transition Check
if (tb._ToItem.ActiveParent == null || tb._RangeItem.ActiveParent == null)
return "?";
int startIndex = 0;
int index = -1;
string prefix = null;
@@ -195,6 +195,9 @@ namespace Volian.Controls.Library
// figure out whether at same level, have same parent and have same HLS:
ItemInfo itm1 = _CurTrans.MyItemToID;
ItemInfo itm2 = _CurTrans.MyItemRangeID;
// Invalid existing transition
if (itm2.ActiveParent == null || itm1.ActiveParent == null)
return;
//if (_CurTrans.TranType == 2 && itm1.ItemID == itm2.ItemID) itm2 = itm1.LastSibling;
bool samHLS = itm1.MyHLS.ItemID == itm2.MyHLS.ItemID;
int lev1 = 0;