Remove space as thousands separator when return formula to user.

(grafted from 11b585c55b443564fefcff38cd7ce297d31659c0)

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2017-09-06 09:58:48 +03:00
parent 9f9144dd56
commit 3499b04c56
2 changed files with 5 additions and 0 deletions

View File

@ -50,6 +50,7 @@
- [#743] Valentina doesn't update update pattern after adding item.
- Fix translation variables.
- [#744] Check for Updates button produces error.
- Remove space as thousands separator when return formula to user.
# Version 0.5.0 May 9, 2017
- [#581] User can now filter input lists by keyword in function wizard.

View File

@ -1051,6 +1051,10 @@ QString VTranslateVars::FormulaToUser(const QString &formula, bool osSeparator)
loc = QLocale();// To user locale
QString dStr = loc.toString(d);// Number string in user locale
if (loc.groupSeparator().isSpace())
{
dStr.replace(loc.groupSeparator(), "");
}
newFormula.replace(nKeys.at(i), nValues.at(i).length(), dStr);
const int bias = nValues.at(i).length() - dStr.length();
if (bias != 0)