Fix ZEC double precision display, add validations

This commit is contained in:
Aditya Kulkarni
2018-10-15 14:59:48 -07:00
parent 1c282000c8
commit 44554f7ff4
10 changed files with 128 additions and 41 deletions

View File

@@ -18,7 +18,7 @@ void BalancesTableModel::setNewData(const QMap<QString, double>* balances,
delete modeldata;
modeldata = new QList<std::tuple<QString, QString>>();
std::for_each(balances->constKeyValueBegin(), balances->constKeyValueEnd(), [=] (auto it) {
modeldata->push_back(std::make_tuple(it.first, QString::number(it.second, 'f')));
modeldata->push_back(std::make_tuple(it.first, QString::number(it.second, 'g', 8)));
});
// And then update the data