diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2021-12-20 15:15:37 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2021-12-20 15:15:37 +0200 |
| commit | 35dfed5a480f1e2316f5e4eaf5e284697679e408 (patch) | |
| tree | e8612de59ccca47bb12780f63d9aef814c3a3bd7 /Software/Visual_Studio/Tango.SharedUI | |
| parent | 392131c3594c2a73a1bd961eadd2ab44fa85aa8b (diff) | |
| parent | f67b8d11029ce185b4f13ec0fd866bfe4380be7d (diff) | |
| download | Tango-35dfed5a480f1e2316f5e4eaf5e284697679e408.tar.gz Tango-35dfed5a480f1e2316f5e4eaf5e284697679e408.zip | |
Merged Jobs V2
Diffstat (limited to 'Software/Visual_Studio/Tango.SharedUI')
| -rw-r--r-- | Software/Visual_Studio/Tango.SharedUI/Controls/NavigationControl.cs | 5 |
1 files changed, 4 insertions, 1 deletions
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 |
