mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-24 20:22:41 +01:00
More general approach
This commit is contained in:
parent
13cfef9144
commit
c13db1f4a7
@ -539,23 +539,24 @@ namespace Nikse.SubtitleEdit.Core.Forms
|
||||
bestRightInCueFrame = newRightInCueFrame;
|
||||
}
|
||||
|
||||
// Re-check if, with the new cues, the subtitles are actually connected
|
||||
var newDistance = FramesToMilliseconds(bestRightInCueFrame) - FramesToMilliseconds(bestLeftOutCueFrame);
|
||||
if (newDistance < Configuration.Settings.BeautifyTimeCodes.Profile.ConnectedSubtitlesTreatConnected)
|
||||
{
|
||||
// Yes, so handle using the designated function, ignoring its check connected check
|
||||
// (because otherwise it would have handled it before going into the FixChainableSubtitles function)
|
||||
FixConnectedSubtitles(leftParagraph, rightParagraph, checkConnected: false);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Check cases
|
||||
var isLeftOutCueOnShotChange = IsCueOnShotChange(bestLeftOutCueFrame, false);
|
||||
var isRightInCueOnShotChange = IsCueOnShotChange(bestRightInCueFrame, true);
|
||||
|
||||
var performGeneralChaining = false;
|
||||
|
||||
if (isLeftOutCueOnShotChange && isRightInCueOnShotChange
|
||||
&& bestLeftOutCueFrameInfo.result == FindBestCueResult.SnappedToRedZone && bestRightInCueFrameInfo.result == FindBestCueResult.SnappedToRedZone
|
||||
&& bestLeftOutCueFrame == bestRightInCueFrame)
|
||||
{
|
||||
// If both cues are being snapped to the exact same shot change, the subtitles really are connected
|
||||
// So, handle using the designated function, ignoring the "treat connected" value (because otherwise it would have handled it before going into this function)
|
||||
FixConnectedSubtitles(leftParagraph, rightParagraph, checkConnected: false);
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (isRightInCueOnShotChange)
|
||||
if (isRightInCueOnShotChange)
|
||||
{
|
||||
// The right in cue is on a shot change
|
||||
// Try to chain the subtitles
|
||||
|
Loading…
Reference in New Issue
Block a user