From 2d685e78e0a4e3b831a95d6a54d8cc8f5db0bada Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 4 Oct 2016 16:37:39 +0300 Subject: [PATCH] Fixed issue #572. Issue with thousand separator during a formula translations to user. --HG-- branch : release --- ChangeLog.txt | 1 + src/libs/vpatterndb/vtranslatevars.cpp | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 4cf1b7578..d943bf25c 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -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. diff --git a/src/libs/vpatterndb/vtranslatevars.cpp b/src/libs/vpatterndb/vtranslatevars.cpp index 145ed6a05..07eb1f597 100644 --- a/src/libs/vpatterndb/vtranslatevars.cpp +++ b/src/libs/vpatterndb/vtranslatevars.cpp @@ -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)