mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-05 16:43:52 +01:00
Bug 2241 - Spectral Selection Toolbar displays frequencies 100x too small in some languages
This commit is contained in:
@@ -733,6 +733,8 @@ void NumericConverter::ParseFormatString(
|
||||
|
||||
if (format[i] == '|') {
|
||||
wxString remainder = format.Right(format.length() - i - 1);
|
||||
// For languages which use , as a separator.
|
||||
remainder.Replace(wxT(","), wxT("."));
|
||||
|
||||
if (remainder == wxT("#"))
|
||||
mScalingFactor = mSampleRate;
|
||||
@@ -740,7 +742,7 @@ void NumericConverter::ParseFormatString(
|
||||
mNtscDrop = true;
|
||||
}
|
||||
else
|
||||
remainder.ToDouble(&mScalingFactor);
|
||||
remainder.ToCDouble(&mScalingFactor);
|
||||
i = format.length()-1; // force break out of loop
|
||||
if (!delimStr.empty())
|
||||
handleDelim = true;
|
||||
@@ -805,6 +807,13 @@ void NumericConverter::ParseFormatString(
|
||||
if (delimStr.length() > 1)
|
||||
delimStr = delimStr.BeforeLast('.');
|
||||
}
|
||||
// Bug 2241 - Also handle , as decimal point
|
||||
// for languages like French and German.
|
||||
else if (!inFrac && delimStr[delimStr.length()-1]==',') {
|
||||
goToFrac = true;
|
||||
if (delimStr.length() > 1)
|
||||
delimStr = delimStr.BeforeLast(',');
|
||||
}
|
||||
|
||||
if (inFrac) {
|
||||
if (numFracFields == 0) {
|
||||
|
||||
Reference in New Issue
Block a user