[TimeUpDown] - Do not duplicated split character.

This commit is contained in:
Ivandro Ismael 2017-02-27 18:57:34 +00:00
parent c81cde6386
commit bfd953d733

View File

@ -50,9 +50,14 @@ namespace Nikse.SubtitleEdit.Controls
if (_splitChars == null)
{
var splitChars = new List<char> { ':', ',', '.' };
if (CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator.Length == 1)
string cultureSeparator = CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator;
if (cultureSeparator.Length == 1)
{
splitChars.Add(Convert.ToChar(CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator));
char ch = Convert.ToChar(cultureSeparator);
if (!splitChars.Contains(ch))
{
splitChars.Add(ch);
}
}
_splitChars = splitChars.ToArray();
}