Skip to content

Commit

Permalink
GUI: Peers: When sorting by address, sort by network first
Browse files Browse the repository at this point in the history
  • Loading branch information
luke-jr committed May 18, 2022
1 parent 30308cc commit c22bbba
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/qt/peertablesortproxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ bool PeerTableSortProxy::lessThan(const QModelIndex& left_index, const QModelInd
case PeerTableModel::NetNodeId:
return left_stats.nodeid < right_stats.nodeid;
case PeerTableModel::Address:
if (left_stats.m_network != right_stats.m_network) {
return left_stats.m_network < right_stats.m_network;
}
return left_stats.m_addr_name.compare(right_stats.m_addr_name) < 0;
case PeerTableModel::Direction:
return left_stats.fInbound > right_stats.fInbound; // default sort Inbound, then Outbound
Expand Down

0 comments on commit c22bbba

Please sign in to comment.