Skip to content

Commit 2f88303

Browse files
committed
src/qt/mempoolfeetables.cpp:sorting by column header and color fixed
1 parent e57ce98 commit 2f88303

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/qt/mempoolfeetables.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ QVariant MempoolFeeTableModel::data(const QModelIndex& index, int role) const
6565
}
6666
} else if (role == Qt::DecorationRole) {
6767
if (column == FeeRange) {
68-
int row = index.row();
69-
if (row >= 0 && row < static_cast<int>(colors.size())) {
70-
return colors[row];
71-
} else if (row >= static_cast<int>(colors.size())) {
68+
int original_index = fee_info->original_index;
69+
if (original_index >= 0 && original_index < static_cast<int>(colors.size())) {
70+
return colors[original_index];
71+
} else if (original_index >= static_cast<int>(colors.size())) {
7272
// If row index exceeds available colors, use the last color
7373
return colors[static_cast<int>(colors.size()) - 1];
7474
}

0 commit comments

Comments
 (0)