diff options
author | Philip Kaufmann <phil.kaufmann@t-online.de> | 2012-06-18 22:48:35 +0200 |
---|---|---|
committer | Luke Dashjr <luke-jr+git@utopios.org> | 2012-07-05 22:48:58 +0000 |
commit | d2ee96d88f3db45b8b4f7a1ed97f7b62054f70b2 (patch) | |
tree | 3224565f37106ce40473f36fcac98acd4309c989 /src | |
parent | 34709a786c3cefb11d5677bcad4bb764a0fba31d (diff) | |
download | bitcoin-d2ee96d88f3db45b8b4f7a1ed97f7b62054f70b2.tar.xz |
GUI: ensure a changed bitcoin unit immediately updates the tx list amounts
Diffstat (limited to 'src')
-rw-r--r-- | src/qt/transactiontablemodel.cpp | 7 | ||||
-rw-r--r-- | src/qt/transactiontablemodel.h | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp index 28620bf3aa..a8ffe62ed9 100644 --- a/src/qt/transactiontablemodel.cpp +++ b/src/qt/transactiontablemodel.cpp @@ -218,6 +218,8 @@ TransactionTableModel::TransactionTableModel(CWallet* wallet, WalletModel *paren QTimer *timer = new QTimer(this); connect(timer, SIGNAL(timeout()), this, SLOT(update())); timer->start(MODEL_UPDATE_DELAY); + + connect(walletModel->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit())); } TransactionTableModel::~TransactionTableModel() @@ -619,3 +621,8 @@ QModelIndex TransactionTableModel::index(int row, int column, const QModelIndex } } +void TransactionTableModel::updateDisplayUnit() +{ + // emit dataChanged to update Amount column with the current unit + emit dataChanged(index(0, Amount), index(priv->size()-1, Amount)); +} diff --git a/src/qt/transactiontablemodel.h b/src/qt/transactiontablemodel.h index db88a0604f..3efeaa61bc 100644 --- a/src/qt/transactiontablemodel.h +++ b/src/qt/transactiontablemodel.h @@ -74,6 +74,8 @@ private: private slots: void update(); +public slots: + void updateDisplayUnit(); friend class TransactionTablePriv; }; |