mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-21 18:52:36 +01:00
Check for in-between shot changes when connecting subtitles while using a very high "Tread as connected" setting
This commit is contained in:
parent
5fd050a1b8
commit
bd6f556fbf
@ -363,11 +363,23 @@ namespace Nikse.SubtitleEdit.Core.Forms
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Check if there are really no shot changes in between
|
||||
var firstShotChangeInBetween = GetFirstShotChangeFrameInBetween(bestLeftOutCueFrameInfo.cueFrame, bestRightInCueFrameInfo.cueFrame);
|
||||
var lastShotChangeInBetween = GetLastShotChangeFrameInBetween(bestLeftOutCueFrameInfo.cueFrame, bestRightInCueFrameInfo.cueFrame);
|
||||
|
||||
if (firstShotChangeInBetween != null || lastShotChangeInBetween != null)
|
||||
{
|
||||
// There are, so snap to the one that is closest to either of the two cues
|
||||
AlignCuesAroundClosestShotChange(firstShotChangeInBetween ?? int.MinValue, lastShotChangeInBetween ?? int.MaxValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Fallback when no shot changes were apparently found: just chain them
|
||||
newLeftOutCueFrame = newRightInCueFrame - Configuration.Settings.BeautifyTimeCodes.Profile.Gap;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Just chain them
|
||||
|
Loading…
Reference in New Issue
Block a user