Skip to content

Commit

Permalink
Fixed remote devices being lost on view update.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimi1010 committed May 27, 2024
1 parent b5be879 commit 9660636
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Pcap++/src/PcapRemoteDeviceList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ void PcapRemoteDeviceList::updateDeviceListView()
// refresh which can easily be handled by clearing the view list too.
if (m_RemoteDeviceList.size() != m_RemoteDeviceListView.size())
{
m_RemoteDeviceList.resize(m_RemoteDeviceListView.size());
m_RemoteDeviceListView.resize(m_RemoteDeviceList.size());
// Full update of all elements of the view vector to synchronize them with the main vector.
std::transform(m_RemoteDeviceList.begin(), m_RemoteDeviceList.end(), m_RemoteDeviceListView.begin(),
[](const std::shared_ptr<PcapRemoteDevice>& ptr) { return ptr.get(); });
Expand Down

0 comments on commit 9660636

Please sign in to comment.