Skip to content

Commit

Permalink
LoadGuiElement(ComboBox): Default to index 0 if text is not in list
Browse files Browse the repository at this point in the history
  • Loading branch information
n00mkrad committed Aug 22, 2021
1 parent d0b32b5 commit 5c4fcd0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Code/IO/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5c4fcd0

Please sign in to comment.