diff --git a/src/DynamoCoreWpf/ViewModels/PackageManager/PackageManagerViewModel.cs b/src/DynamoCoreWpf/ViewModels/PackageManager/PackageManagerViewModel.cs index 6844339f966..b5cf8ca24d8 100644 --- a/src/DynamoCoreWpf/ViewModels/PackageManager/PackageManagerViewModel.cs +++ b/src/DynamoCoreWpf/ViewModels/PackageManager/PackageManagerViewModel.cs @@ -1,7 +1,7 @@ -using Dynamo.Controls; +using System; +using System.Collections.ObjectModel; using Dynamo.ViewModels; using NotificationObject = Dynamo.Core.NotificationObject; -using System.Collections.ObjectModel; namespace Dynamo.PackageManager { @@ -53,6 +53,12 @@ public PackageManagerViewModel(DynamoViewModel dynamoViewModel, PackageManagerSe PkgSearchVM.RegisterTransientHandlers(); LocalPackages.CollectionChanged += LocalPackages_CollectionChanged; + + // We are forced to make the update ourselves if the Preferences ViewModel has not been initialized yet + if (String.IsNullOrEmpty(PreferencesViewModel?.SelectedPackagePathForInstall)) + { + PreferencesViewModel.SelectedPackagePathForInstall = dynamoViewModel.PreferenceSettings.SelectedPackagePathForInstall; + } } private void LocalPackages_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) diff --git a/src/DynamoCoreWpf/Views/PackageManager/PackageManagerView.xaml b/src/DynamoCoreWpf/Views/PackageManager/PackageManagerView.xaml index 239bed5d29e..91e5ed4e768 100644 --- a/src/DynamoCoreWpf/Views/PackageManager/PackageManagerView.xaml +++ b/src/DynamoCoreWpf/Views/PackageManager/PackageManagerView.xaml @@ -33,6 +33,18 @@ +