Fixed issue #572. Issue with thousand separator during a formula translations
to user. --HG-- branch : release
This commit is contained in:
parent
14a6d07b59
commit
2d685e78e0
|
@ -22,6 +22,7 @@
|
||||||
- [#553] Tape.exe crash. Issue with the Search field.
|
- [#553] Tape.exe crash. Issue with the Search field.
|
||||||
- [#569] Tape app. Options that open new file open new instance even if a user doesn't want this.
|
- [#569] Tape app. Options that open new file open new instance even if a user doesn't want this.
|
||||||
- [#539] Infinite alert loop "Gradation doesn't support inches" when loading standard table.
|
- [#539] Infinite alert loop "Gradation doesn't support inches" when loading standard table.
|
||||||
|
- [#572] Issue with thousand separator during a formula translations to user.
|
||||||
|
|
||||||
# Version 0.4.4 April 12, 2016
|
# Version 0.4.4 April 12, 2016
|
||||||
- Updated measurement templates with all measurements. Added new template Aldrich/Women measurements.
|
- Updated measurement templates with all measurements. Added new template Aldrich/Women measurements.
|
||||||
|
|
|
@ -904,7 +904,11 @@ QString VTranslateVars::FormulaToUser(const QString &formula, bool osSeparator)
|
||||||
|
|
||||||
loc = QLocale::system();// To user locale
|
loc = QLocale::system();// To user locale
|
||||||
QString dStr = loc.toString(d);// Number string in user locale
|
QString dStr = loc.toString(d);// Number string in user locale
|
||||||
dStr.replace(" ", ""); // Remove thousand separator
|
const QChar thSep = loc.groupSeparator();
|
||||||
|
if (thSep.isSpace())
|
||||||
|
{
|
||||||
|
dStr.remove(thSep);// Remove thousand separator
|
||||||
|
}
|
||||||
newFormula.replace(nKeys.at(i), nValues.at(i).length(), dStr);
|
newFormula.replace(nKeys.at(i), nValues.at(i).length(), dStr);
|
||||||
const int bias = nValues.at(i).length() - dStr.length();
|
const int bias = nValues.at(i).length() - dStr.length();
|
||||||
if (bias != 0)
|
if (bias != 0)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user