GUI: TransactionTableModel: Remove bitcoin unit from Amount column header

This commit is contained in:
Luke Dashjr 2018-12-15 20:14:57 +00:00 committed by Gregory Sanders
parent 19c87c0ae7
commit eef551a588
2 changed files with 1 additions and 10 deletions

View file

@ -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));
}

View file

@ -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; }