diff options
author | Roy Badami <roy@gnomon.org.uk> | 2014-07-07 21:00:58 +0100 |
---|---|---|
committer | Roy Badami <roy@gnomon.org.uk> | 2014-07-07 21:00:58 +0100 |
commit | 2e4fee2ac4824570c1340a8f8fe2aed4580de879 (patch) | |
tree | 3e25c26cc3b6cc5ccc97c4b46969f76776d1bd86 /src/qt/bitcoinunits.cpp | |
parent | 7007402956579ace12d45cdcfae908802d3d6b6d (diff) |
Show bitcoin quantities with full precision, even in the presence of trailing zeros
Diffstat (limited to 'src/qt/bitcoinunits.cpp')
-rw-r--r-- | src/qt/bitcoinunits.cpp | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/qt/bitcoinunits.cpp b/src/qt/bitcoinunits.cpp index 1b5eaa2dc5..cf635e1941 100644 --- a/src/qt/bitcoinunits.cpp +++ b/src/qt/bitcoinunits.cpp @@ -114,14 +114,6 @@ QString BitcoinUnits::format(int unit, qint64 n, bool fPlus, SeparatorStyle sepa QString quotient_str = QString::number(quotient); QString remainder_str = QString::number(remainder).rightJustified(num_decimals, '0'); - // Right-trim excess zeros after the decimal point - int nTrim = 0; - for (int i = remainder_str.size()-1; i>=2 && (remainder_str.at(i) == '0'); --i) - ++nTrim; - remainder_str.chop(nTrim); - if (fAlign) - remainder_str.append(QString(QChar(FIGURE_SP_CP)).repeated(nTrim)); - // Use SI-stule separators as these are locale indendent and can't be // confused with the decimal marker. Rule is to use a thin space every // three digits on *both* sides of the decimal point - but only if there |