summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/ViewModels
diff options
context:
space:
mode:
authorsr55 <[email protected]>2012-12-08 12:28:17 +0000
committersr55 <[email protected]>2012-12-08 12:28:17 +0000
commit36c4b34ba05bd1992f0f8757c1b804ca6f2ca4c8 (patch)
tree910b06f9c792d2d2f9250ffa8addcb8caf727052 /win/CS/HandBrakeWPF/ViewModels
parent4697af4cb3a01dd7dff88ff8f9ff8b6eef1639d6 (diff)
WinGui: When we have a variable framerate preset, reset to "same as source" rather than just remaining at whatever fps was set previously.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5090 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs2
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs12
2 files changed, 8 insertions, 6 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
index 9511de2ae..273a2f6d5 100644
--- a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs
@@ -1875,7 +1875,7 @@ namespace HandBrakeWPF.ViewModels
userSettingService.SetUserSetting(UserSettingConstants.X264Step, double.Parse(this.SelectedGranulairty, CultureInfo.InvariantCulture));
int value;
- if (int.TryParse(this.MinLength.ToString(), out value))
+ if (int.TryParse(this.MinLength.ToString(CultureInfo.InvariantCulture), out value))
{
this.userSettingService.SetUserSetting(ASUserSettingConstants.MinScanDuration, value);
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
index 888afb132..dba17ea7a 100644
--- a/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/VideoViewModel.cs
@@ -15,7 +15,6 @@ namespace HandBrakeWPF.ViewModels
using Caliburn.Micro;
- using HandBrake.ApplicationServices;
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Model.Encoding;
using HandBrake.ApplicationServices.Parsing;
@@ -31,6 +30,12 @@ namespace HandBrakeWPF.ViewModels
public class VideoViewModel : ViewModelBase, IVideoViewModel
{
#region Constants and Fields
+
+ /// <summary>
+ /// Same as source constant.
+ /// </summary>
+ private const string SameAsSource = "Same as source";
+
/// <summary>
/// Backing field for the user setting service.
/// </summary>
@@ -413,10 +418,7 @@ namespace HandBrakeWPF.ViewModels
}
this.SelectedVideoEncoder = preset.Task.VideoEncoder;
- if (preset.Task.Framerate.HasValue)
- {
- this.SelectedFramerate = preset.Task.Framerate.Value.ToString(CultureInfo.InvariantCulture);
- }
+ this.SelectedFramerate = preset.Task.Framerate.HasValue ? preset.Task.Framerate.Value.ToString(CultureInfo.InvariantCulture) : SameAsSource;
this.IsConstantQuantity = preset.Task.VideoEncodeRateType == VideoEncodeRateType.ConstantQuality;