summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2017-06-07 20:37:21 +0100
committersr55 <[email protected]>2017-06-07 20:37:21 +0100
commitb97eca8ba68e4e5aaf6f13b8f1eefa62a3fd86bd (patch)
tree35887d455599604666efed4ae07c3f2047d5a372 /win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
parente2632a1177355ad0d502c06c288bdad4e01c0b35 (diff)
WinGui: Prevent the export of built-in presets. There is little point in allowing this. The UI does not allow importing them. #768
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs23
1 files changed, 12 insertions, 11 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
index 31efc4d9b..0a8d0b297 100644
--- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs
@@ -2031,17 +2031,18 @@ namespace HandBrakeWPF.ViewModels
/// </summary>
public void PresetExport()
{
- SaveFileDialog savefiledialog = new SaveFileDialog
- {
- Filter = "json|*.json",
- CheckPathExists = true,
- AddExtension = true,
- DefaultExt = ".json",
- OverwritePrompt = true,
- FilterIndex = 0
- };
- if (this.selectedPreset != null)
- {
+ if (this.selectedPreset != null && !this.selectedPreset.IsBuildIn)
+ {
+ SaveFileDialog savefiledialog = new SaveFileDialog
+ {
+ Filter = "json|*.json",
+ CheckPathExists = true,
+ AddExtension = true,
+ DefaultExt = ".json",
+ OverwritePrompt = true,
+ FilterIndex = 0
+ };
+
savefiledialog.ShowDialog();
string filename = savefiledialog.FileName;