From eef551a5885404beea7bdb815087d153ea39a85f Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Sat, 15 Dec 2018 20:14:57 +0000 Subject: [PATCH] GUI: TransactionTableModel: Remove bitcoin unit from Amount column header --- src/qt/transactiontablemodel.cpp | 9 +-------- src/qt/transactiontablemodel.h | 2 -- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp index 04e361cf8a..f09c0864d9 100644 --- a/src/qt/transactiontablemodel.cpp +++ b/src/qt/transactiontablemodel.cpp @@ -227,7 +227,7 @@ TransactionTableModel::TransactionTableModel(const PlatformStyle *_platformStyle fProcessingQueuedTransactions(false), platformStyle(_platformStyle) { - columns << QString() << QString() << tr("Date") << tr("Type") << tr("Label") << BitcoinUnits::getAmountColumnTitle(walletModel->getOptionsModel()->getDisplayUnit()); + columns << QString() << QString() << tr("Date") << tr("Type") << tr("Label") << tr("Amount"); priv->refreshWallet(walletModel->wallet()); connect(walletModel->getOptionsModel(), &OptionsModel::displayUnitChanged, this, &TransactionTableModel::updateDisplayUnit); @@ -241,12 +241,6 @@ TransactionTableModel::~TransactionTableModel() delete priv; } -/** Updates the column title to "Amount (DisplayUnit)" and emits headerDataChanged() signal for table headers to react. */ -void TransactionTableModel::updateAmountColumnTitle() -{ - columns[Amount] = BitcoinUnits::getAmountColumnTitle(walletModel->getOptionsModel()->getDisplayUnit()); - Q_EMIT headerDataChanged(Qt::Horizontal,Amount,Amount); -} void TransactionTableModel::updateTransaction(const QString &hash, int status, bool showTransaction) { @@ -696,7 +690,6 @@ QModelIndex TransactionTableModel::index(int row, int column, const QModelIndex void TransactionTableModel::updateDisplayUnit() { // emit dataChanged to update Amount column with the current unit - updateAmountColumnTitle(); Q_EMIT dataChanged(index(0, Amount), index(priv->size()-1, Amount)); } diff --git a/src/qt/transactiontablemodel.h b/src/qt/transactiontablemodel.h index 8be3a7ab2e..d846627a23 100644 --- a/src/qt/transactiontablemodel.h +++ b/src/qt/transactiontablemodel.h @@ -112,8 +112,6 @@ public Q_SLOTS: void updateTransaction(const QString &hash, int status, bool showTransaction); void updateConfirmations(); void updateDisplayUnit(); - /** Updates the column title to "Amount (DisplayUnit)" and emits headerDataChanged() signal for table headers to react. */ - void updateAmountColumnTitle(); /* Needed to update fProcessingQueuedTransactions through a QueuedConnection */ void setProcessingQueuedTransactions(bool value) { fProcessingQueuedTransactions = value; }