From 857938f18bab321eb3d4835241dc4ef40ef9df56 Mon Sep 17 00:00:00 2001 From: Rodrigo Braz Monteiro Date: Fri, 27 Jul 2007 07:08:22 +0000 Subject: [PATCH] Joining of two lines will no longer take the timings of any line that starts and ends at 0 into consideration. Issue #206 Originally committed to SVN as r1445. --- aegisub/changelog.txt | 1 + aegisub/subs_grid.cpp | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/aegisub/changelog.txt b/aegisub/changelog.txt index 9ebde8d1d..c0f7950e5 100644 --- a/aegisub/changelog.txt +++ b/aegisub/changelog.txt @@ -155,6 +155,7 @@ Please visit http://aegisub.net to download latest version - Treat comments inside {}'s as plain text, not as overrides; Also, don't assume override blocks start with a backslash, even if they probably should (Dansolo) - Removed FexTracker due to licensing problems; there are plans to implement a new motion tracker in its place (jfs) - Changed translation assistent to use Scintilla text controls to avoid several issues, including Right-To-Left text entry. (AMZ) +- Joining of two lines will no longer take the timings of any line that starts and ends at 0 into consideration. (AMZ) = 1.10 beta - 2006.08.07 =========================== diff --git a/aegisub/subs_grid.cpp b/aegisub/subs_grid.cpp index 6c09bc405..b2c1ee306 100644 --- a/aegisub/subs_grid.cpp +++ b/aegisub/subs_grid.cpp @@ -1049,11 +1049,18 @@ void SubtitlesGrid::JoinLines(int n1,int n2,bool concat) { int start,end; bool gotfirst = false; for (int i=n1;i<=n2;i++) { + // Get start and end time of current line cur = GetDialogue(i); start = cur->Start.GetMS(); end = cur->End.GetMS(); - if (start < min_ms) min_ms = start; - if (end > max_ms) max_ms = end; + + // Don't take the timing of zero lines + if (start != 0 || end != 0) { + if (start < min_ms) min_ms = start; + if (end > max_ms) max_ms = end; + } + + // Set text if (concat || !gotfirst) { if (gotfirst) finalText += _T("\\N"); gotfirst = true;