mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-25 06:01:14 +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] == '|') {
|
if (format[i] == '|') {
|
||||||
wxString remainder = format.Right(format.length() - i - 1);
|
wxString remainder = format.Right(format.length() - i - 1);
|
||||||
|
// For languages which use , as a separator.
|
||||||
|
remainder.Replace(wxT(","), wxT("."));
|
||||||
|
|
||||||
if (remainder == wxT("#"))
|
if (remainder == wxT("#"))
|
||||||
mScalingFactor = mSampleRate;
|
mScalingFactor = mSampleRate;
|
||||||
@@ -740,7 +742,7 @@ void NumericConverter::ParseFormatString(
|
|||||||
mNtscDrop = true;
|
mNtscDrop = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
remainder.ToDouble(&mScalingFactor);
|
remainder.ToCDouble(&mScalingFactor);
|
||||||
i = format.length()-1; // force break out of loop
|
i = format.length()-1; // force break out of loop
|
||||||
if (!delimStr.empty())
|
if (!delimStr.empty())
|
||||||
handleDelim = true;
|
handleDelim = true;
|
||||||
@@ -805,6 +807,13 @@ void NumericConverter::ParseFormatString(
|
|||||||
if (delimStr.length() > 1)
|
if (delimStr.length() > 1)
|
||||||
delimStr = delimStr.BeforeLast('.');
|
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 (inFrac) {
|
||||||
if (numFracFields == 0) {
|
if (numFracFields == 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user