summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsr55 <[email protected]>2012-06-24 13:36:41 +0000
committersr55 <[email protected]>2012-06-24 13:36:41 +0000
commit7e1d3dc3448805803138cb4fe4ad1e1c8d6f1c85 (patch)
treefa7b683fcdcc5b4d1e228d5d75e1aae731a326a2
parent8644f55a4e49256e684f92a30d50cd70a32339b4 (diff)
WinGui: Additional fixes to the picture settings panel.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4774 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs30
1 files changed, 17 insertions, 13 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs
index 78c2600b2..d68db870b 100644
--- a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs
@@ -574,20 +574,20 @@ namespace HandBrakeWPF.ViewModels
this.SelectedAnamorphicMode = preset.Task.Anamorphic;
// Set the limits on the UI Controls.
- this.MaxWidth = preset.Task.MaxWidth ?? sourceResolution.Width;
- this.MaxHeight = preset.Task.MaxHeight ?? sourceResolution.Height;
+ this.MaxWidth = sourceResolution.Width;
+ this.MaxHeight = sourceResolution.Height;
this.Task.MaxWidth = preset.Task.MaxWidth;
this.Task.MaxHeight = preset.Task.MaxHeight;
if (preset.Task.MaxWidth.HasValue)
{
- if (this.Width > this.MaxWidth)
+ if (this.Width > preset.Task.MaxWidth)
{
- this.Width = this.MaxWidth;
+ this.Width = preset.Task.MaxWidth.Value;
}
else
{
- this.Width = preset.Task.Width ?? this.getRes((sourceResolution.Width - this.CropLeft - this.CropRight), this.MaxWidth);
+ this.Width = preset.Task.Width ?? this.getRes((sourceResolution.Width - this.CropLeft - this.CropRight), preset.Task.MaxWidth.Value);
}
}
else
@@ -597,19 +597,15 @@ namespace HandBrakeWPF.ViewModels
if (preset.Task.MaxHeight.HasValue)
{
- if (this.Height > this.MaxHeight)
+ if (this.Height > preset.Task.MaxHeight)
{
- this.Height = this.MaxHeight;
+ this.Height = preset.Task.MaxHeight.Value;
}
else
{
- this.Height = preset.Task.Height ?? this.getRes((sourceResolution.Height - this.CropTop - this.CropBottom), this.MaxHeight);
+ this.Height = preset.Task.Height ?? this.getRes((sourceResolution.Height - this.CropTop - this.CropBottom), preset.Task.MaxHeight.Value);
}
}
- else
- {
- this.Height = preset.Task.Height ?? (sourceResolution.Height - this.CropTop - this.CropBottom);
- }
// Anamorphic
if (preset.Task.Anamorphic == Anamorphic.Custom)
@@ -619,7 +615,15 @@ namespace HandBrakeWPF.ViewModels
this.ParHeight = preset.Task.PixelAspectY;
}
- this.MaintainAspectRatio = preset.Task.KeepDisplayAspect;
+ // Default this to On.
+ if (preset.Task.Anamorphic == Anamorphic.None)
+ {
+ this.MaintainAspectRatio = true;
+ }
+ else
+ {
+ this.MaintainAspectRatio = preset.Task.KeepDisplayAspect;
+ }
if (preset.Task.Modulus.HasValue)
{