From 5ce88f24ee86d46e395def5d3abae77094ef8d07 Mon Sep 17 00:00:00 2001 From: John Date: Wed, 18 Nov 2015 14:15:06 +0000 Subject: [PATCH] Check for a bad number in the step config for the checkoff value. If the value is invalid, then default to the first item in the checkoff list. --- PROMS/Volian.Controls.Library/DisplayTags.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/PROMS/Volian.Controls.Library/DisplayTags.cs b/PROMS/Volian.Controls.Library/DisplayTags.cs index 9b5e6d06..3cc6c607 100644 --- a/PROMS/Volian.Controls.Library/DisplayTags.cs +++ b/PROMS/Volian.Controls.Library/DisplayTags.cs @@ -240,7 +240,11 @@ namespace Volian.Controls.Library { cmbCheckoff.Items.Add(co.MenuItem); } - if (sc.Step_CheckOffIndex != -1) cmbCheckoff.SelectedIndex = sc.Step_CheckOffIndex; + // bug fix B2015-186 + // the config had a really big number for the checkoff index. + // if that config number is greater than the number of items in the checkoff list, default to an index of zero + if (sc.Step_CheckOffIndex != -1) + cmbCheckoff.SelectedIndex = (sc.Step_CheckOffIndex <= cmbCheckoff.Items.Count - 1) ? sc.Step_CheckOffIndex : 0; } // if there are no checkoffs OR // if this is a sign-off, the checkoff list is not enabled either (matches 16bit functionality) At some point, we