From c70c8a574fc13a1df97f1118503cb8055a561452 Mon Sep 17 00:00:00 2001 From: John Date: Tue, 24 Jan 2017 16:13:00 +0000 Subject: [PATCH] =?UTF-8?q?B2015-170=20=E2=80=93=20don=E2=80=99t=20allow?= =?UTF-8?q?=20a=20transition=20to=20a=20non-sequential=20step?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PROMS/Volian.Controls.Library/DisplayTransition.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/PROMS/Volian.Controls.Library/DisplayTransition.cs b/PROMS/Volian.Controls.Library/DisplayTransition.cs index 2f37a327..de78501e 100644 --- a/PROMS/Volian.Controls.Library/DisplayTransition.cs +++ b/PROMS/Volian.Controls.Library/DisplayTransition.cs @@ -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