mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +01:00
Merge pull request #388 from UdjinM6/v0.12.0.x_sum_tx
V0.12.0.x sum tx separator and negative value highlight
This commit is contained in:
commit
faf150d9d3
@ -449,7 +449,6 @@ void TransactionView::showDetails()
|
||||
/** Compute sum of all selected transactions */
|
||||
void TransactionView::computeSum()
|
||||
{
|
||||
QString amountText;
|
||||
qint64 amount = 0;
|
||||
int nDisplayUnit = model->getOptionsModel()->getDisplayUnit();
|
||||
if(!transactionView->selectionModel())
|
||||
@ -460,7 +459,8 @@ void TransactionView::computeSum()
|
||||
foreach (QModelIndex index, selection){
|
||||
amount += index.data(TransactionTableModel::AmountRole).toLongLong();
|
||||
}
|
||||
QString strAmount(BitcoinUnits::formatWithUnit(nDisplayUnit, amount, true));
|
||||
QString strAmount(BitcoinUnits::formatWithUnit(nDisplayUnit, amount, true, BitcoinUnits::separatorAlways));
|
||||
if (amount < 0) strAmount = "<span style='color:red;'>" + strAmount + "</span>";
|
||||
emit trxAmount(strAmount);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user