Skip to content

Commit

Permalink
Fixed loadouts selection box not updating
Browse files Browse the repository at this point in the history
  • Loading branch information
TekkaGB committed Jul 3, 2022
1 parent 4c83cdb commit 60f0bcb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Unverum/UI/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1945,6 +1945,7 @@ private void GameBox_DropDownClosed(object sender, EventArgs e)
else
DiscordButton.Visibility = Visibility.Visible;
Global.config.CurrentGame = (((GameBox.SelectedValue as ComboBoxItem).Content as StackPanel).Children[1] as TextBlock).Text.Trim().Replace(":", String.Empty);

if (!Global.config.Configs.ContainsKey(Global.config.CurrentGame))
{
Global.ModList = new();
Expand Down Expand Up @@ -1977,6 +1978,9 @@ private void GameBox_DropDownClosed(object sender, EventArgs e)
Global.config.Configs[Global.config.CurrentGame].Loadouts[Global.config.Configs[Global.config.CurrentGame].CurrentLoadout] = new();
Global.ModList = Global.config.Configs[Global.config.CurrentGame].Loadouts[Global.config.Configs[Global.config.CurrentGame].CurrentLoadout];
}
Global.LoadoutItems = new ObservableCollection<String>(Global.config.Configs[Global.config.CurrentGame].Loadouts.Keys);
LoadoutsBox.ItemsSource = Global.LoadoutItems;
LoadoutsBox.SelectedItem = Global.config.Configs[Global.config.CurrentGame].CurrentLoadout;
var currentModDirectory = $@"{Global.assemblyLocation}{Global.s}Mods{Global.s}{Global.config.CurrentGame}";
Directory.CreateDirectory(currentModDirectory);
ModsWatcher.Path = currentModDirectory;
Expand Down
2 changes: 1 addition & 1 deletion Unverum/Unverum.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<UseWPF>true</UseWPF>
<ApplicationIcon>Assets\unverum.ico</ApplicationIcon>
<AssemblyName>Unverum</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
<AssemblyVersion>2.2.0.0</AssemblyVersion>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 60f0bcb

Please sign in to comment.