diff --git a/AM2RLauncher/AM2RLauncher/MainForm/MainForm.StateMachine.cs b/AM2RLauncher/AM2RLauncher/MainForm/MainForm.StateMachine.cs index 6d12c51..b385d11 100644 --- a/AM2RLauncher/AM2RLauncher/MainForm/MainForm.StateMachine.cs +++ b/AM2RLauncher/AM2RLauncher/MainForm/MainForm.StateMachine.cs @@ -353,15 +353,9 @@ public partial class MainForm } // Update stored profiles in the Profile Settings tab + // TODO: For some reason this is needed, because if its removed, the selected index goes bonkers modSettingsProfileDropDown.SelectedIndex = profileDropDown.DataStore.Any() ? 0 : -1; - // Refresh the author and version label on the main tab - if (profileList.Count > 0) - { - profileAuthorLabel.Text = Text.Author + " " + profileList[profileDropDown.SelectedIndex].Author; - profileVersionLabel.Text = Text.VersionLabel + " " + profileList[profileDropDown.SelectedIndex].Version; - } - log.Info("Reloading UI components after loading successful."); UpdateStateMachine(); diff --git a/AM2RLauncher/AM2RLauncher/MainForm/MainForm.UI.cs b/AM2RLauncher/AM2RLauncher/MainForm/MainForm.UI.cs index 0464a1f..b375231 100644 --- a/AM2RLauncher/AM2RLauncher/MainForm/MainForm.UI.cs +++ b/AM2RLauncher/AM2RLauncher/MainForm/MainForm.UI.cs @@ -221,7 +221,7 @@ public partial class MainForm : Form if (OS.IsLinux) profileDropDown = new DropDown(); - profileDropDown.DataStore = (profileList); + profileDropDown.DataStore = profileList; centerInterface.AddRow(profileDropDown); @@ -546,7 +546,7 @@ public partial class MainForm : Form modSettingsProfileDropDown = new DropDown(); modSettingsProfileDropDown.DataStore = profileDropDown.DataStore; - modSettingsProfileDropDown.Bind(m => m.SelectedIndex, profileDropDown, p => p.SelectedIndex); + modSettingsProfileDropDown.SelectedIndexBinding.Bind(profileDropDown, p => p.SelectedIndex); desktopShortcutButton = new SmallColorButton(Text.CreateShortcut); profileButton = new SmallColorButton(Text.OpenProfileFolder);