Merge pull request #423 from crowning-/UI_Enhancements

De-selecting all transactions resets computed sum to 0 now.
This commit is contained in:
evan82 2015-07-12 10:47:52 -07:00
commit bacd3e456f

View File

@ -472,14 +472,12 @@ void TransactionView::computeSum()
return;
QModelIndexList selection = transactionView->selectionModel()->selectedRows();
if(!selection.isEmpty()){
foreach (QModelIndex index, selection){
amount += index.data(TransactionTableModel::AmountRole).toLongLong();
}
QString strAmount(BitcoinUnits::formatWithUnit(nDisplayUnit, amount, true, BitcoinUnits::separatorAlways));
if (amount < 0) strAmount = "<span style='color:red;'>" + strAmount + "</span>";
emit trxAmount(strAmount);
foreach (QModelIndex index, selection){
amount += index.data(TransactionTableModel::AmountRole).toLongLong();
}
QString strAmount(BitcoinUnits::formatWithUnit(nDisplayUnit, amount, true, BitcoinUnits::separatorAlways));
if (amount < 0) strAmount = "<span style='color:red;'>" + strAmount + "</span>";
emit trxAmount(strAmount);
}
void TransactionView::openThirdPartyTxUrl(QString url)