diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2012-05-11 06:40:04 -0700 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2012-05-11 06:40:04 -0700 |
commit | 2692ed3f01fed4e107a0e1e1ecd3ef9b01267cc9 (patch) | |
tree | e6fdd2ed4d77bf31c32301e0c14e3460d18bc3f1 | |
parent | 23f59e7023ecc5cd27ba23ffc095b3225fc32033 (diff) | |
parent | 66331f2b519e57bb7538535a47a228e654ed5525 (diff) |
Merge pull request #1258 from Diapolo/RPCCon_never_0_Blocks
GUI RPC Console: if there is no current block number available display N/A on totalBlocks label,...
-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 85f79309f3..9254fe4cb5 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()); } } |