@@ -44,6 +44,7 @@ using namespace std;
4444PacketManager::PacketManager (PacketDecoder* pd, Session& session)
4545 : m_session(session)
4646 , m_filter(pd)
47+ , m_refreshPending(false )
4748{
4849
4950}
@@ -72,6 +73,7 @@ void PacketManager::RefreshRows()
7273 lock_guard<recursive_mutex> lock (m_mutex);
7374
7475 // Clear all existing row state
76+ m_refreshPending = false ;
7577 m_rows.clear ();
7678
7779 // Make a list of waveform timestamps and make sure we display them in order
@@ -185,7 +187,7 @@ void PacketManager::Update()
185187 m_cachekey = key;
186188
187189 // Remove any old history we might have had from this timestamp
188- RemoveHistoryFrom (time, false );
190+ RemoveHistoryFrom (time);
189191
190192 // Copy the new packets and detach them so the filter doesn't delete them.
191193 // Do the merging now
@@ -259,8 +261,7 @@ void PacketManager::FilterPackets()
259261 m_filteredChildPackets = m_childPackets;
260262
261263 // but still refresh the set of rows being displayed
262- RefreshRows ();
263-
264+ m_refreshPending = true ;
264265 return ;
265266 }
266267
@@ -301,18 +302,15 @@ void PacketManager::FilterPackets()
301302 }
302303 }
303304
304- // Refresh the set of rows being displayed
305- RefreshRows ();
305+ m_refreshPending = true ;
306306}
307307
308308/* *
309309 @brief Removes all history from the specified timestamp
310310
311311 @param timestamp Time to remove the history from
312- @param refreshAfter True if we should refresh the list of displayed rows, false to not refresh
313- (should only be set false in Update())
314312 */
315- void PacketManager::RemoveHistoryFrom (TimePoint timestamp, bool refreshAfter )
313+ void PacketManager::RemoveHistoryFrom (TimePoint timestamp)
316314{
317315 lock_guard<recursive_mutex> lock (m_mutex);
318316
@@ -329,8 +327,7 @@ void PacketManager::RemoveHistoryFrom(TimePoint timestamp, bool refreshAfter)
329327 m_filteredPackets.erase (timestamp);
330328
331329 // update the list of displayed rows so we don't have anything left pointing to stale packets
332- if (refreshAfter)
333- RefreshRows ();
330+ m_refreshPending = true ;
334331}
335332
336333void PacketManager::RemoveChildHistoryFrom (Packet* pack)
0 commit comments