From b6309677a1abf4be35121c4301c499815c086271 Mon Sep 17 00:00:00 2001 From: MiWCryptoCurrency Date: Sat, 7 Oct 2017 14:17:02 -0400 Subject: [PATCH] fix age and weight labels for sort in coin control nAge and calculated by not used, should be used in hidden int column weight is being flattened to a float, breaking sort. as string padded int will sort as expected --- src/qt/coincontroldialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp index 4ca6277..e58fc07 100644 --- a/src/qt/coincontroldialog.cpp +++ b/src/qt/coincontroldialog.cpp @@ -837,13 +837,13 @@ void CoinControlDialog::updateView() nInputSum += nInputSize; // List Mode Weight - itemOutput->setText(COLUMN_WEIGHT, QString::number(nTxWeight, 'f',0)); + itemOutput->setText(COLUMN_WEIGHT, strPad(QString::number((uint64_t)nTxWeight),8," ")); // Age uint64_t nAge = GetTime() - out.tx->GetTxTime(); double age = (double)nAge/60/60/24; itemOutput->setText(COLUMN_AGE, QString::number(age, 'f', 2)); - itemOutput->setText(COLUMN_AGE_int64_t, strPad(QString::number(age), 15, " ")); + itemOutput->setText(COLUMN_AGE_int64_t, strPad(QString::number(nAge), 15, " ")); // Potential Stake double nPotentialStake = 20 / (1 + (nBestHeight / YEARLY_BLOCKCOUNT));