Skip to content

Commit 3bccd50

Browse files
committed
qt: Set flag after inital load on transaction table model
1 parent 74a960a commit 3bccd50

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/qt/transactiontablemodel.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ class TransactionTablePriv
9797
QList<TransactionRecord> cachedWallet;
9898

9999
bool fQueueNotifications = false;
100+
/** True when model finishes loading all wallet transactions on start */
101+
bool m_loaded = false;
100102
std::vector< TransactionNotification > vQueueNotifications;
101103

102104
void NotifyTransactionChanged(const uint256 &hash, ChangeType status);
@@ -106,15 +108,15 @@ class TransactionTablePriv
106108
*/
107109
void refreshWallet(interfaces::Wallet& wallet)
108110
{
109-
qDebug() << "TransactionTablePriv::refreshWallet";
110-
cachedWallet.clear();
111+
assert(!m_loaded);
111112
{
112113
for (const auto& wtx : wallet.getWalletTxs()) {
113114
if (TransactionRecord::showTransaction()) {
114115
cachedWallet.append(TransactionRecord::decomposeTransaction(wtx));
115116
}
116117
}
117118
}
119+
m_loaded = true;
118120
}
119121

120122
/* Update our model of the wallet incrementally, to synchronize our model of the wallet

0 commit comments

Comments
 (0)