diff options
author | João Barbosa <joao.paulo.barbosa@gmail.com> | 2021-04-28 23:58:11 +0100 |
---|---|---|
committer | João Barbosa <joao.paulo.barbosa@gmail.com> | 2021-04-28 23:58:11 +0100 |
commit | 3bccd50ad2f384e6c8c97c7f44bda7ae0d777696 (patch) | |
tree | d9665278a21518d80c2ac793a4fee677fa1c4f70 /src | |
parent | 74a960a220a32b4e240551ba992d5199edac38fc (diff) | |
download | bitcoin-3bccd50ad2f384e6c8c97c7f44bda7ae0d777696.tar.xz |
qt: Set flag after inital load on transaction table model
Diffstat (limited to 'src')
-rw-r--r-- | src/qt/transactiontablemodel.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp index a7556eed04..9e2cccf33c 100644 --- a/src/qt/transactiontablemodel.cpp +++ b/src/qt/transactiontablemodel.cpp @@ -97,6 +97,8 @@ public: QList<TransactionRecord> cachedWallet; bool fQueueNotifications = false; + /** True when model finishes loading all wallet transactions on start */ + bool m_loaded = false; std::vector< TransactionNotification > vQueueNotifications; void NotifyTransactionChanged(const uint256 &hash, ChangeType status); @@ -106,8 +108,7 @@ public: */ void refreshWallet(interfaces::Wallet& wallet) { - qDebug() << "TransactionTablePriv::refreshWallet"; - cachedWallet.clear(); + assert(!m_loaded); { for (const auto& wtx : wallet.getWalletTxs()) { if (TransactionRecord::showTransaction()) { @@ -115,6 +116,7 @@ public: } } } + m_loaded = true; } /* Update our model of the wallet incrementally, to synchronize our model of the wallet |