aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2012-06-19 22:34:03 -0700
committerWladimir J. van der Laan <[email protected]>2012-06-19 22:34:03 -0700
commit703db97d80ea21a44ed74c8bbbaf1430c5e0dd37 (patch)
tree94d9a118c23ac4c43ccf753d9aa7f8b88ad29cfa /src
parentprint large orphan warning BEFORE deleting pvMsg (diff)
parentGUI: ensure a changed bitcoin unit immediately updates the tx list amounts (diff)
downloaddiscoin-703db97d80ea21a44ed74c8bbbaf1430c5e0dd37.tar.xz
discoin-703db97d80ea21a44ed74c8bbbaf1430c5e0dd37.zip
Merge pull request #1483 from Diapolo/txtablemodel_updateDisplayUnit
GUI: ensure a changed bitcoin unit immediately updates the tx list amounts
Diffstat (limited to 'src')
-rw-r--r--src/qt/transactiontablemodel.cpp7
-rw-r--r--src/qt/transactiontablemodel.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp
index a86b1f7c5..b3e001ea1 100644
--- a/src/qt/transactiontablemodel.cpp
+++ b/src/qt/transactiontablemodel.cpp
@@ -230,6 +230,8 @@ TransactionTableModel::TransactionTableModel(CWallet* wallet, WalletModel *paren
QTimer *timer = new QTimer(this);
connect(timer, SIGNAL(timeout()), this, SLOT(updateConfirmations()));
timer->start(MODEL_UPDATE_DELAY);
+
+ connect(walletModel->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit()));
}
TransactionTableModel::~TransactionTableModel()
@@ -624,3 +626,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 0aafa7091..fd321ce28 100644
--- a/src/qt/transactiontablemodel.h
+++ b/src/qt/transactiontablemodel.h
@@ -76,6 +76,7 @@ private:
public slots:
void updateTransaction(const QString &hash, int status);
void updateConfirmations();
+ void updateDisplayUnit();
friend class TransactionTablePriv;
};