Mercurial > hg > bitcoin
changeset 2475:61f9248d93de draft
if there is no current block number available display N/A on totalBlocks label, instead of 0, which can not ever be true
author | Philip Kaufmann <phil.kaufmann@t-online.de> |
---|---|
date | Fri, 11 May 2012 12:29:31 +0200 |
parents | 38085276fbd8 |
children | 44413fcca3b4 |
files | src/qt/rpcconsole.cpp |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -232,7 +232,8 @@ ui->numberOfBlocks->setText(QString::number(count)); if(clientModel) { - ui->totalBlocks->setText(QString::number(clientModel->getNumBlocksOfPeers())); + // If there is no current number available display N/A instead of 0, which can't ever be true + ui->totalBlocks->setText(clientModel->getNumBlocksOfPeers() == 0 ? tr("N/A") : QString::number(clientModel->getNumBlocksOfPeers())); ui->lastBlockTime->setText(clientModel->getLastBlockDate().toString()); } }