summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs17
1 files changed, 16 insertions, 1 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs
index c36a7bcef..0495b8fcc 100644
--- a/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/ChaptersViewModel.cs
@@ -217,6 +217,16 @@ namespace HandBrakeWPF.ViewModels
}
/// <summary>
+ /// Setup this tab for the specified preset.
+ /// </summary>
+ /// <param name="preset">
+ /// The preset.
+ /// </param>
+ public void SetPreset(Preset preset)
+ {
+ }
+
+ /// <summary>
/// Set the Source Chapters List
/// </summary>
/// <param name="sourceChapters">
@@ -229,10 +239,15 @@ namespace HandBrakeWPF.ViewModels
this.Chapters.Clear();
// Then Add new Chapter Markers.
+ int counter = 1;
+
foreach (Chapter chapter in this.SourceChapterList)
{
- var marker = new ChapterMarker(chapter.ChapterNumber, chapter.ChapterName);
+ string chapterName = string.IsNullOrEmpty(chapter.ChapterName) ? string.Format("Chapter {0}", counter) : chapter.ChapterName;
+ var marker = new ChapterMarker(chapter.ChapterNumber, chapterName);
this.Chapters.Add(marker);
+
+ counter += 1;
}
}