Simple subtitle formats weren't being split-recombined correctly in some cases after modifications, because AssEntrty::StartMS didn't match AssDialogue::Start, which caused sorting to fail.

Make a hacky fix that involves setting StartMS to Start.GetMS() when Clone()ing an AssDialogue.

Originally committed to SVN as r2700.
This commit is contained in:
Niels Martin Hansen 2009-01-20 20:08:34 +00:00
parent 1fc063f759
commit 4ddc90f027

View file

@ -781,7 +781,6 @@ AssEntry *AssDialogue::Clone() {
// Copy data // Copy data
final->group = group; final->group = group;
final->StartMS = StartMS;
final->Valid = Valid; final->Valid = Valid;
final->Actor = Actor; final->Actor = Actor;
final->Comment = Comment; final->Comment = Comment;
@ -790,7 +789,7 @@ AssEntry *AssDialogue::Clone() {
final->Layer = Layer; final->Layer = Layer;
for (int i=0;i<4;i++) final->Margin[i] = Margin[i]; for (int i=0;i<4;i++) final->Margin[i] = Margin[i];
final->Start = Start; final->Start = Start;
final->StartMS = final->StartMS; final->StartMS = Start.GetMS(); // Assume that StartMS might not be valid, because something altered Start without altering StartMS
final->Style = Style; final->Style = Style;
final->Text = Text; final->Text = Text;
//final->SetEntryData(GetEntryData()); //final->SetEntryData(GetEntryData());