From e566794de8b26fc97b1d4316eb6170a482d022c1 Mon Sep 17 00:00:00 2001 From: sr55 Date: Sun, 4 Nov 2018 17:23:24 +0000 Subject: [PATCH] WinGui: Better default directory for Import SRT. #1661 --- win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs index 3d26296fd..fb8dc838c 100644 --- a/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs @@ -244,6 +244,15 @@ namespace HandBrakeWPF.ViewModels Multiselect = true }; + if (this.Task != null && this.Task.Source != null) + { + string path = Path.GetDirectoryName(this.Task.Source); + if (Directory.Exists(path)) + { + dialog.InitialDirectory = path; + } + } + dialog.ShowDialog(); this.AddInputSubtitles(dialog.FileNames); -- 2.40.0