summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2018-05-24 21:07:20 +0100
committersr55 <[email protected]>2018-05-24 21:07:20 +0100
commit1b4d3a46f3643b73997973dca05f8558c0acafce (patch)
tree583ce267659a57091dd218faf7cf5fabc20db485 /win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
parentf6e6fc6c47298a0dd17dad6a6c387c18fe13c6b8 (diff)
WinGui: Don't allow subtitle import before a source has been scanned.
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs9
1 files changed, 9 insertions, 0 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
index 3d19a81f5..a081d28d5 100644
--- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
@@ -1839,6 +1839,15 @@ namespace HandBrakeWPF.ViewModels
return;
}
+ if (this.SelectedTitle == null)
+ {
+ MessageBox.Show(
+ ResourcesUI.MainView_SubtitleBeforeScanError,
+ Resources.Error,
+ MessageBoxButton.OK,
+ MessageBoxImage.Error);
+ }
+
// StartScan is not synchronous, so for now we don't support adding both srt and video file at the same time.
string[] subtitleFiles = fileNames.Where(f => Path.GetExtension(f)?.ToLower() == ".srt").ToArray();
if (this.SelectedTab != 5 && subtitleFiles.Any())