diff --git a/src/libse/Common/Subtitle.cs b/src/libse/Common/Subtitle.cs index c248fcf05..a403d87be 100644 --- a/src/libse/Common/Subtitle.cs +++ b/src/libse/Common/Subtitle.cs @@ -27,24 +27,23 @@ namespace Nikse.SubtitleEdit.Core.Common public List HistoryItems { get; } public bool CanUndo => HistoryItems.Count > 0; - public Subtitle() + public Subtitle() : this(new List(), new List()) { - Paragraphs = new List(); - HistoryItems = new List(); - FileName = "Untitled"; } - public Subtitle(List historyItems) - : this() + public Subtitle(List paragraphs) : this(paragraphs, new List()) + { + } + + public Subtitle(List historyItems) : this(new List(), historyItems) { - HistoryItems = historyItems; } public Subtitle(List paragraphs, List historyItems) - : this() { HistoryItems = historyItems; Paragraphs = paragraphs; + FileName = "Untitled"; } /// @@ -76,10 +75,6 @@ namespace Nikse.SubtitleEdit.Core.Common OriginalEncoding = subtitle.OriginalEncoding; } - public Subtitle(List paragraphs) : this() - { - Paragraphs = paragraphs; - } /// /// Get the paragraph of index, null if out of bounds