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.
This commit is contained in:
parent
5ff5a09831
commit
5ce88f24ee
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user