From 20f49c625cd32b95154db138ed7eeebbadd04bf7 Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Mon, 1 Nov 2021 14:53:16 +0200 Subject: Color selection and Job sequence package. Redesign list control, move Color Selection View to dialogs, implement save. --- Software/Visual_Studio/Tango.SharedUI/Controls/NavigationControl.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Software/Visual_Studio/Tango.SharedUI/Controls') diff --git a/Software/Visual_Studio/Tango.SharedUI/Controls/NavigationControl.cs b/Software/Visual_Studio/Tango.SharedUI/Controls/NavigationControl.cs index cefdbbfd6..29c260563 100644 --- a/Software/Visual_Studio/Tango.SharedUI/Controls/NavigationControl.cs +++ b/Software/Visual_Studio/Tango.SharedUI/Controls/NavigationControl.cs @@ -282,7 +282,10 @@ namespace Tango.SharedUI.Controls private void OnSelectedIndexChanged() { - SelectedElement = Elements[SelectedIndex > Elements.Count - 1 ? 0 : SelectedIndex]; + if (Elements.Count > 0 && SelectedIndex > -1) + { + SelectedElement = Elements[SelectedIndex > Elements.Count - 1 ? 0 : SelectedIndex]; + } } #endregion -- cgit v1.3.1