Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gui: Fix bug in recent transaction list #2403

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions src/qt/overviewpage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,15 +217,6 @@ void OverviewPage::updateTransactions()
{
int numItems = getNumTransactionsForView();

// When we receive our first transaction, we can free the memory used
// for the "nothing here yet" placeholder in the transaction list. It
// will never appear again:
//
if (!filter->rowCount())
{
ui->recentTransactionsNoResult->setVisible(true);
}

LogPrint(BCLog::LogFlags::QT, "OverviewPage::updateTransactions(): numItems = %d, getLimit() = %d",
numItems, filter->getLimit());

Expand Down Expand Up @@ -254,6 +245,13 @@ void OverviewPage::updateTransactions()
}

ui->listTransactions->update();

int transaction_count = filter->rowCount();

// This needs to be both here and in SetPrivacy because the trigger could come from either.
ui->recentTransactionsNoResult->setVisible(m_privacy || !transaction_count);
ui->listTransactions->setVisible(!m_privacy && transaction_count);

LogPrint(BCLog::LogFlags::QT, "OverviewPage::updateTransactions(), end update");
}
}
Expand Down Expand Up @@ -328,6 +326,7 @@ void OverviewPage::setPrivacy(bool privacy)
} else {
ui->recentTransactionsNoResult->showDefaultNothingHereTitle();
}

ui->recentTransactionsNoResult->setVisible(m_privacy || !transaction_count);
ui->listTransactions->setVisible(!m_privacy && transaction_count);
if (researcherModel) researcherModel->setMaskAccrualAndMagnitude(m_privacy);
Expand Down