summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/ViewModels
diff options
context:
space:
mode:
authorsr55 <[email protected]>2018-11-04 17:23:24 +0000
committersr55 <[email protected]>2018-11-04 17:23:24 +0000
commite566794de8b26fc97b1d4316eb6170a482d022c1 (patch)
tree02bd95f6db59c0bcb31653f2fade59edf649aa25 /win/CS/HandBrakeWPF/ViewModels
parentf150842bcf21ad649438eb1de1f86e2ef4321615 (diff)
WinGui: Better default directory for Import SRT. #1661
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/SubtitlesViewModel.cs9
1 files changed, 9 insertions, 0 deletions
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);