B2015-170 – don’t allow a transition to a non-sequential step

This commit is contained in:
John Jenko 2017-01-24 16:13:00 +00:00
parent 54765cea95
commit c70c8a574f

View File

@ -1199,6 +1199,13 @@ namespace Volian.Controls.Library
"Cannot add recusive transition", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
return;
}
// B2015-170 - don't allow a transition to step that is not sequental
if ((toItem != null &&!toItem.IsNumbered) || (rangeItem != null && !rangeItem.IsNumbered))
{
MessageBox.Show("For transitions containing step references, the transition must be to a numbered or lettered step.",
"Cannot add transition to a non-seqential step", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
return;
}
bool doTranmod = cbPageNum.Visible && cbPageNum.Checked;
trantxt = TransitionText.GetResolvedText(MyRTB.MyItemInfo, listBoxTranFmt.SelectedIndex, toItem, rangeItem ?? toItem, doTranmod);
int ss = MyRTB.SelectionStart;// Remember where the link is being added