Fixed bug in batch-convert - offset did not work right (thx Carl)

git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@420 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
niksedk 2011-05-04 15:28:40 +00:00
parent a2ea09df2f
commit ba3701056d

View File

@ -396,7 +396,11 @@ namespace Nikse.SubtitleEdit.Forms
{
try
{
sub.AddTimeToAllParagraphs(new TimeSpan(int.Parse(parts[1]), int.Parse(parts[2]), int.Parse(parts[3]), int.Parse(parts[4])));
TimeSpan ts = new TimeSpan(0, int.Parse(parts[1].TrimStart('-')), int.Parse(parts[2]), int.Parse(parts[3]), int.Parse(parts[4]));
if (parts[1].StartsWith("-"))
sub.AddTimeToAllParagraphs(ts.Negate());
else
sub.AddTimeToAllParagraphs(ts);
}
catch
{