diff options
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs')
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs | 18 |
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">
|