summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2012-08-04 18:44:50 +0000
committersr55 <[email protected]>2012-08-04 18:44:50 +0000
commitf7f029f905acf0fab8a361e3a87554b1d7a1344a (patch)
treea27325ff6524f11aa83fc29b549c9be1673c714c /win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs
parent0ec04d13f9239ae21f2ff05700fee55474bd3b3a (diff)
WinGui: Added a right click menu for the Audio, Subtitles and Chapters tabs with some common actions.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4888 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs18
1 files changed, 18 insertions, 0 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs
index 586167840..ee2cebe34 100644
--- a/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs
@@ -33,6 +33,11 @@ namespace HandBrakeWPF.ViewModels
[Export(typeof(IChaptersViewModel))]
public class ChaptersViewModel : ViewModelBase, IChaptersViewModel
{
+ /// <summary>
+ /// The source chapters backing field
+ /// </summary>
+ private List<Chapter> sourceChaptersList;
+
#region Constructors and Destructors
/// <summary>
@@ -207,6 +212,8 @@ namespace HandBrakeWPF.ViewModels
{
this.IncludeChapterMarkers = preset.Task.IncludeChapterMarkers;
}
+
+ this.sourceChaptersList = title.Chapters;
this.SetSourceChapters(title.Chapters);
}
@@ -241,6 +248,17 @@ namespace HandBrakeWPF.ViewModels
}
/// <summary>
+ /// Reset Chapter Names
+ /// </summary>
+ public void Reset()
+ {
+ if (this.sourceChaptersList != null)
+ {
+ this.SetSourceChapters(this.sourceChaptersList);
+ }
+ }
+
+ /// <summary>
/// Set the Source Chapters List
/// </summary>
/// <param name="sourceChapters">