diff options
author | sr55 <[email protected]> | 2013-09-01 15:31:24 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2013-09-01 15:31:24 +0000 |
commit | cd5085da6ab11a2dac5b92170a3aa894ef0c09ef (patch) | |
tree | 85492e70b6cc0dedf98839d887c0e3867ef6f355 /win/CS/HandBrakeWPF | |
parent | 1901457e8b1d66abc1e321d887968e1419cb489e (diff) |
WinGui: Fix an issue with the Seconds mode (not setting end point correctly)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5762 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF')
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index fef4b1cdd..213b2118b 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -706,7 +706,7 @@ namespace HandBrakeWPF.ViewModels }
this.NotifyOfPropertyChange(() => this.CurrentTask);
- this.Duration = this.selectedTitle.Duration.ToString();
+ this.Duration = this.selectedTitle.Duration.ToString("g");
// Setup the tab controls
this.SetupTabs();
@@ -830,7 +830,7 @@ namespace HandBrakeWPF.ViewModels this.SelectedStartPoint = 0;
int timeInSeconds;
- if (int.TryParse(selectedTitle.Duration.TotalSeconds.ToString(CultureInfo.InvariantCulture), out timeInSeconds))
+ if (int.TryParse(Math.Round(selectedTitle.Duration.TotalSeconds, 0).ToString(CultureInfo.InvariantCulture), out timeInSeconds))
{
this.SelectedEndPoint = timeInSeconds;
}
@@ -1777,12 +1777,12 @@ namespace HandBrakeWPF.ViewModels switch (this.SelectedPointToPoint)
{
case PointToPointMode.Chapters:
- return this.SelectedTitle.CalculateDuration(this.SelectedStartPoint, this.SelectedEndPoint).ToString();
+ return this.SelectedTitle.CalculateDuration(this.SelectedStartPoint, this.SelectedEndPoint).ToString("g");
case PointToPointMode.Seconds:
- return TimeSpan.FromSeconds(startEndDuration).ToString();
+ return TimeSpan.FromSeconds(startEndDuration).ToString("g");
case PointToPointMode.Frames:
startEndDuration = startEndDuration / selectedTitle.Fps;
- return TimeSpan.FromSeconds(startEndDuration).ToString();
+ return TimeSpan.FromSeconds(Math.Round(startEndDuration, 2)).ToString("g");
}
return "--:--:--";
|