Fixed issue #572. Issue with thousand separator during a formula translations

to user.

--HG--
branch : release
This commit is contained in:
Roman Telezhynskyi 2016-10-04 16:37:39 +03:00
parent 14a6d07b59
commit 2d685e78e0
2 changed files with 6 additions and 1 deletions

View file

@ -22,6 +22,7 @@
- [#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.
- [#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
- Updated measurement templates with all measurements. Added new template Aldrich/Women measurements.

View file

@ -904,7 +904,11 @@ QString VTranslateVars::FormulaToUser(const QString &formula, bool osSeparator)
loc = QLocale::system();// To 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);
const int bias = nValues.at(i).length() - dStr.length();
if (bias != 0)