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:
parent
76710282b4
commit
aace632c9b
@ -497,6 +497,9 @@ namespace VEPROMS.CSLA.Library
|
|||||||
}
|
}
|
||||||
private static string BuildString(TransitionBuilder tb)
|
private static string BuildString(TransitionBuilder tb)
|
||||||
{
|
{
|
||||||
|
//Invalid Transition Check
|
||||||
|
if (tb._ToItem.ActiveParent == null || tb._RangeItem.ActiveParent == null)
|
||||||
|
return "?";
|
||||||
int startIndex = 0;
|
int startIndex = 0;
|
||||||
int index = -1;
|
int index = -1;
|
||||||
string prefix = null;
|
string prefix = null;
|
||||||
|
@ -195,6 +195,9 @@ namespace Volian.Controls.Library
|
|||||||
// figure out whether at same level, have same parent and have same HLS:
|
// figure out whether at same level, have same parent and have same HLS:
|
||||||
ItemInfo itm1 = _CurTrans.MyItemToID;
|
ItemInfo itm1 = _CurTrans.MyItemToID;
|
||||||
ItemInfo itm2 = _CurTrans.MyItemRangeID;
|
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;
|
//if (_CurTrans.TranType == 2 && itm1.ItemID == itm2.ItemID) itm2 = itm1.LastSibling;
|
||||||
bool samHLS = itm1.MyHLS.ItemID == itm2.MyHLS.ItemID;
|
bool samHLS = itm1.MyHLS.ItemID == itm2.MyHLS.ItemID;
|
||||||
int lev1 = 0;
|
int lev1 = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user