diff options
| author | Jaquee <jaquee.monero@gmail.com> | 2016-12-31 14:56:08 +0100 |
|---|---|---|
| committer | Jaquee <jaquee.monero@gmail.com> | 2016-12-31 14:56:08 +0100 |
| commit | f012e4d9684344651c9031191b1ab4e473b4d216 (patch) | |
| tree | 7ce5acf63b722f080d03ff70c8f0321faffadbd9 | |
| parent | d8f9e7360fdbab910283c465aafe36149b1d7f26 (diff) | |
| download | monzero-gui-f012e4d9684344651c9031191b1ab4e473b4d216.tar.gz monzero-gui-f012e4d9684344651c9031191b1ab4e473b4d216.tar.xz monzero-gui-f012e4d9684344651c9031191b1ab4e473b4d216.zip | |
history: show pending on top
| -rw-r--r-- | components/HistoryTable.qml | 2 | ||||
| -rw-r--r-- | src/model/TransactionHistoryModel.cpp | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/components/HistoryTable.qml b/components/HistoryTable.qml index 5bf2a3c8..c4ebe188 100644 --- a/components/HistoryTable.qml +++ b/components/HistoryTable.qml @@ -239,7 +239,7 @@ ListView { font.pixelSize: 13 font.letterSpacing: -1 color: "#545454" - text: blockHeight + text: (typeof blockHeight != "undefined")? blockHeight : qsTr("Pending") + translationManager.emptyString } } diff --git a/src/model/TransactionHistoryModel.cpp b/src/model/TransactionHistoryModel.cpp index 333893aa..9aed10ce 100644 --- a/src/model/TransactionHistoryModel.cpp +++ b/src/model/TransactionHistoryModel.cpp @@ -75,7 +75,11 @@ QVariant TransactionHistoryModel::data(const QModelIndex &index, int role) const result = tInfo->fee(); break; case TransactionBlockHeightRole: - result = tInfo->blockHeight(); + // Use NULL QVariant for transactions without height. + // Forces them to be displayed at top when sorted by blockHeight. + if (tInfo->blockHeight() != 0) { + result = tInfo->blockHeight(); + } break; case TransactionHashRole: result = tInfo->hash(); |
