From 480710890ee8072372dc0127d3d5ddff7bb367c2 Mon Sep 17 00:00:00 2001 From: Timothy Baldridge Date: Mon, 16 May 2022 17:25:02 -0600 Subject: [PATCH] Auto-set the download path when selecting a install path --- .../View Models/Installers/MO2InstallerVM.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Wabbajack.App.Wpf/View Models/Installers/MO2InstallerVM.cs b/Wabbajack.App.Wpf/View Models/Installers/MO2InstallerVM.cs index abc93600..8e87a272 100644 --- a/Wabbajack.App.Wpf/View Models/Installers/MO2InstallerVM.cs +++ b/Wabbajack.App.Wpf/View Models/Installers/MO2InstallerVM.cs @@ -15,6 +15,7 @@ using Wabbajack; using Wabbajack.DTOs; using Wabbajack.DTOs.Interventions; using Wabbajack.Interventions; +using Wabbajack.Paths; using Wabbajack.Util; namespace Wabbajack @@ -53,6 +54,15 @@ namespace Wabbajack PathType = FilePickerVM.PathTypeOptions.Folder, PromptTitle = "Select Installation Directory", }; + Location.WhenAnyValue(t => t.TargetPath) + .Subscribe(newPath => + { + if (newPath != default && DownloadLocation!.TargetPath == AbsolutePath.Empty) + { + DownloadLocation.TargetPath = newPath.Combine("downloads"); + } + }).DisposeWith(CompositeDisposable); + DownloadLocation = new FilePickerVM() { ExistCheckOption = FilePickerVM.CheckOptions.Off,