Merge pull request #1686 from ivandrofly/mnr

[JoinSubtitles] - Exit the loop as soon as the name is found in list.
This commit is contained in:
Nikolaj Olsson 2016-04-06 05:33:19 +02:00
commit b1e8f23555

View File

@ -68,7 +68,10 @@ namespace Nikse.SubtitleEdit.Forms
foreach (string existingFileName in _fileNamesToJoin)
{
if (existingFileName.Equals(fileName, StringComparison.OrdinalIgnoreCase))
{
alreadyInList = true;
break;
}
}
if (!alreadyInList)
_fileNamesToJoin.Add(fileName);