diff options
author | Jonas Schnelli <dev@jonasschnelli.ch> | 2018-07-01 10:27:30 +0200 |
---|---|---|
committer | Jonas Schnelli <dev@jonasschnelli.ch> | 2018-07-01 10:27:43 +0200 |
commit | 10ffca7429326c6cc3c428d7a34eb4a195eb727e (patch) | |
tree | 38cf145143f66aa20b2a6c5b8ab648f7a5cfb148 /src/qt/peertablemodel.cpp | |
parent | a6ed99a1e6facd38913711106bce6fb65bd14862 (diff) | |
parent | 4132ad3bfa5b5ead3f4a592d819d0097881b4827 (diff) |
Merge #13537: GUI: Peer table: Visualize inbound/outbound state for every row
4132ad3bf Show symbol for inbound/outbound in peer table (wodry)
Pull request description:
Fixes #13483
The address in the network peer table is prefixed with an up-arrow symbolizing an outbound connection, or an down-array symbolizing an inbound connection. See screenshot.
The user has an easy visual confirmation about the connection direction state. I really like it :)
Impact to columns sorting is grouping by inbound/outbound first, which in my opinion is an advantage, too.
![bildschirmfoto](https://user-images.githubusercontent.com/8447873/41862752-13803eb2-78a5-11e8-9126-a52385f5ec19.png)
Tree-SHA512: d355f679d34c3006743c06750be5f36a083c1a8376da8f5f35045fcd9df964153409946fdde5007734f23bd692c91355962dc42df31122cdcf88e4affce8bc0e
Diffstat (limited to 'src/qt/peertablemodel.cpp')
-rw-r--r-- | src/qt/peertablemodel.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qt/peertablemodel.cpp b/src/qt/peertablemodel.cpp index 0ca9d48bf6..1c90504e9e 100644 --- a/src/qt/peertablemodel.cpp +++ b/src/qt/peertablemodel.cpp @@ -160,7 +160,8 @@ QVariant PeerTableModel::data(const QModelIndex &index, int role) const case NetNodeId: return (qint64)rec->nodeStats.nodeid; case Address: - return QString::fromStdString(rec->nodeStats.addrName); + // prepend to peer address down-arrow symbol for inbound connection and up-arrow for outbound connection + return QString(rec->nodeStats.fInbound ? "↓ " : "↑ ") + QString::fromStdString(rec->nodeStats.addrName); case Subversion: return QString::fromStdString(rec->nodeStats.cleanSubVer); case Ping: |