diff --git a/StabilityMatrix/ViewModels/InstallerViewModel.cs b/StabilityMatrix/ViewModels/InstallerViewModel.cs index 468346be..3045998d 100644 --- a/StabilityMatrix/ViewModels/InstallerViewModel.cs +++ b/StabilityMatrix/ViewModels/InstallerViewModel.cs @@ -128,14 +128,16 @@ public class InstallerViewModel : INotifyPropertyChanged if (settingsManager.Settings.InstalledPackages.FirstOrDefault(x => x.PackageName == SelectedPackage.Name) == null) { - settingsManager.AddInstalledPackage(new InstalledPackage + var package = new InstalledPackage { Name = SelectedPackage.Name, Path = SelectedPackage.InstallLocation, Id = Guid.NewGuid(), PackageName = SelectedPackage.Name, PackageVersion = "idklol" - }); + }; + settingsManager.AddInstalledPackage(package); + settingsManager.SetActiveInstalledPackage(package); } }); diff --git a/StabilityMatrix/ViewModels/LaunchViewModel.cs b/StabilityMatrix/ViewModels/LaunchViewModel.cs index 8d7cc9b7..50a69d2b 100644 --- a/StabilityMatrix/ViewModels/LaunchViewModel.cs +++ b/StabilityMatrix/ViewModels/LaunchViewModel.cs @@ -97,6 +97,10 @@ public partial class LaunchViewModel : ObservableObject public void OnLoaded() { LoadPackages(); + if (InstalledPackages.Any()) + { + SelectedPackage = InstalledPackages[0]; + } } private void LoadPackages()