diff --git a/src/qt/peertablemodel.cpp b/src/qt/peertablemodel.cpp index b3246936926..dff400059a6 100644 --- a/src/qt/peertablemodel.cpp +++ b/src/qt/peertablemodel.cpp @@ -159,6 +159,7 @@ void PeerTableModel::refresh() // - https://doc.qt.io/qt-5/model-view-programming.html#resizable-models // We take advantage of the fact that the std::vector returned // by interfaces::Node::getNodesStats is sorted by nodeid. + Q_EMIT layoutAboutToBeChanged(); for (int i = 0; i < m_peers_data.size();) { if (i < new_peers_data.size() && m_peers_data.at(i).nodeStats.nodeid == new_peers_data.at(i).nodeStats.nodeid) { ++i; @@ -179,5 +180,5 @@ void PeerTableModel::refresh() m_peers_data.swap(new_peers_data); } - Q_EMIT changed(); + Q_EMIT layoutChanged(); } diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index ff4bfb16f69..1d4e6399ac6 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -684,7 +684,7 @@ void RPCConsole::setClientModel(ClientModel *model, int bestblock_height, int64_ // peer table signal handling - update peer details when selecting new node connect(ui->peerWidget->selectionModel(), &QItemSelectionModel::selectionChanged, this, &RPCConsole::updateDetailWidget); - connect(model->getPeerTableModel(), &PeerTableModel::changed, this, &RPCConsole::updateDetailWidget); + connect(model->getPeerTableModel(), &PeerTableModel::layoutChanged, this, &RPCConsole::updateDetailWidget); // set up ban table ui->banlistWidget->setModel(model->getBanTableModel());