Skip to content

Commit

Permalink
qt: Set flag after inital load on transaction table model
Browse files Browse the repository at this point in the history
  • Loading branch information
promag committed Apr 28, 2021
1 parent 74a960a commit 3bccd50
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/qt/transactiontablemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ class TransactionTablePriv
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);
Expand All @@ -106,15 +108,15 @@ class TransactionTablePriv
*/
void refreshWallet(interfaces::Wallet& wallet)
{
qDebug() << "TransactionTablePriv::refreshWallet";
cachedWallet.clear();
assert(!m_loaded);
{
for (const auto& wtx : wallet.getWalletTxs()) {
if (TransactionRecord::showTransaction()) {
cachedWallet.append(TransactionRecord::decomposeTransaction(wtx));
}
}
}
m_loaded = true;
}

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

0 comments on commit 3bccd50

Please sign in to comment.