Prevent zero-balance accounts from showing up in balances
This commit is contained in:
@@ -23,7 +23,8 @@ void BalancesTableModel::setNewData(const QMap<QString, double>* balances,
|
||||
delete modeldata;
|
||||
modeldata = new QList<std::tuple<QString, double>>();
|
||||
std::for_each(balances->keyBegin(), balances->keyEnd(), [=] (auto keyIt) {
|
||||
modeldata->push_back(std::make_tuple(keyIt, balances->value(keyIt)));
|
||||
if (balances->value(keyIt) > 0)
|
||||
modeldata->push_back(std::make_tuple(keyIt, balances->value(keyIt)));
|
||||
});
|
||||
|
||||
// And then update the data
|
||||
|
||||
Reference in New Issue
Block a user