From 5c4fcd07c10a890b58387603432e9d7e9cc92dfe Mon Sep 17 00:00:00 2001 From: n00mkrad Date: Sun, 22 Aug 2021 19:58:23 +0200 Subject: [PATCH] LoadGuiElement(ComboBox): Default to index 0 if text is not in list --- Code/IO/Config.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Code/IO/Config.cs b/Code/IO/Config.cs index 19c80fe..5258adf 100644 --- a/Code/IO/Config.cs +++ b/Code/IO/Config.cs @@ -195,6 +195,9 @@ public static void SaveComboxIndex(ComboBox comboBox) public static void LoadGuiElement(ComboBox comboBox) { comboBox.Text = Get(comboBox.Name); + + if (comboBox.DropDownStyle == ComboBoxStyle.DropDownList && comboBox.SelectedIndex < 0) + comboBox.SelectedIndex = 0; } public static void LoadGuiElement(TextBox textbox)