aboutsummaryrefslogtreecommitdiff
path: root/src/model
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-01-08 16:56:51 -0800
committerRiccardo Spagni <ric@spagni.net>2017-01-08 16:56:51 -0800
commit3badb12ea365bab1b06ed165ebff9889fad0b5b5 (patch)
tree117b5147f1441d57da1ef46ab8bd04130b6b5b3d /src/model
parent24170f00ccf38ca64f766c78c76dc80900cb1533 (diff)
parentf012e4d9684344651c9031191b1ab4e473b4d216 (diff)
downloadmonzero-gui-3badb12ea365bab1b06ed165ebff9889fad0b5b5.tar.gz
monzero-gui-3badb12ea365bab1b06ed165ebff9889fad0b5b5.tar.xz
monzero-gui-3badb12ea365bab1b06ed165ebff9889fad0b5b5.zip
Merge pull request #376
f012e4d history: show pending on top (Jaquee)
Diffstat (limited to 'src/model')
-rw-r--r--src/model/TransactionHistoryModel.cpp6
1 files changed, 5 insertions, 1 deletions
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();