diff options
| author | Philip Kaufmann <[email protected]> | 2012-05-11 12:29:31 +0200 |
|---|---|---|
| committer | Philip Kaufmann <[email protected]> | 2012-05-11 12:29:31 +0200 |
| commit | 66331f2b519e57bb7538535a47a228e654ed5525 (patch) | |
| tree | e89d7f3a378f8333e9b05bf264ce7d7fa2d2e02e /src | |
| parent | Merge pull request #1251 from Diapolo/transactionview_comments (diff) | |
| download | discoin-66331f2b519e57bb7538535a47a228e654ed5525.tar.xz discoin-66331f2b519e57bb7538535a47a228e654ed5525.zip | |
if there is no current block number available display N/A on totalBlocks label, instead of 0, which can not ever be true
Diffstat (limited to 'src')
| -rw-r--r-- | src/qt/rpcconsole.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index 85f79309f..9254fe4cb 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -232,7 +232,8 @@ void RPCConsole::setNumBlocks(int count) 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()); } } |