mirror of
https://github.com/dashpay/dash.git
synced 2024-12-29 13:59:06 +01:00
Merge pull request #423 from crowning-/UI_Enhancements
De-selecting all transactions resets computed sum to 0 now.
This commit is contained in:
commit
bacd3e456f
@ -472,14 +472,12 @@ void TransactionView::computeSum()
|
|||||||
return;
|
return;
|
||||||
QModelIndexList selection = transactionView->selectionModel()->selectedRows();
|
QModelIndexList selection = transactionView->selectionModel()->selectedRows();
|
||||||
|
|
||||||
if(!selection.isEmpty()){
|
|
||||||
foreach (QModelIndex index, selection){
|
foreach (QModelIndex index, selection){
|
||||||
amount += index.data(TransactionTableModel::AmountRole).toLongLong();
|
amount += index.data(TransactionTableModel::AmountRole).toLongLong();
|
||||||
}
|
}
|
||||||
QString strAmount(BitcoinUnits::formatWithUnit(nDisplayUnit, amount, true, BitcoinUnits::separatorAlways));
|
QString strAmount(BitcoinUnits::formatWithUnit(nDisplayUnit, amount, true, BitcoinUnits::separatorAlways));
|
||||||
if (amount < 0) strAmount = "<span style='color:red;'>" + strAmount + "</span>";
|
if (amount < 0) strAmount = "<span style='color:red;'>" + strAmount + "</span>";
|
||||||
emit trxAmount(strAmount);
|
emit trxAmount(strAmount);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TransactionView::openThirdPartyTxUrl(QString url)
|
void TransactionView::openThirdPartyTxUrl(QString url)
|
||||||
|
Loading…
Reference in New Issue
Block a user