aboutsummaryrefslogtreecommitdiff
path: root/src/qt/coincontroldialog.h
diff options
context:
space:
mode:
authorCozz Lovan <cozzlovan@yahoo.com>2014-03-03 04:16:42 +0100
committerCozz Lovan <cozzlovan@yahoo.com>2014-03-03 23:26:00 +0100
commitdc01ba7b0c203afa78c3312293e0432d680f5d63 (patch)
tree640a5691c5c5d50f18cf8a0bb3457f89369eaf56 /src/qt/coincontroldialog.h
parentaefbf6e30cadaf77ebee44284c74cc5449dc173f (diff)
Fix coin control sorts date as text
Diffstat (limited to 'src/qt/coincontroldialog.h')
-rw-r--r--src/qt/coincontroldialog.h28
1 files changed, 27 insertions, 1 deletions
diff --git a/src/qt/coincontroldialog.h b/src/qt/coincontroldialog.h
index b9318ca7b0..465e2a009d 100644
--- a/src/qt/coincontroldialog.h
+++ b/src/qt/coincontroldialog.h
@@ -65,9 +65,35 @@ private:
COLUMN_TXHASH,
COLUMN_VOUT_INDEX,
COLUMN_AMOUNT_INT64,
- COLUMN_PRIORITY_INT64
+ COLUMN_PRIORITY_INT64,
+ COLUMN_DATE_INT64
};
+ // some columns have a hidden column containing the value used for sorting
+ int getMappedColumn(int column, bool fVisibleColumn = true)
+ {
+ if (fVisibleColumn)
+ {
+ if (column == COLUMN_AMOUNT_INT64)
+ return COLUMN_AMOUNT;
+ else if (column == COLUMN_PRIORITY_INT64)
+ return COLUMN_PRIORITY;
+ else if (column == COLUMN_DATE_INT64)
+ return COLUMN_DATE;
+ }
+ else
+ {
+ if (column == COLUMN_AMOUNT)
+ return COLUMN_AMOUNT_INT64;
+ else if (column == COLUMN_PRIORITY)
+ return COLUMN_PRIORITY_INT64;
+ else if (column == COLUMN_DATE)
+ return COLUMN_DATE_INT64;
+ }
+
+ return column;
+ }
+
private slots:
void showMenu(const QPoint &);
void copyAmount();