Diffstat (limited to 'noncore/net/wellenreiter/gui/packetview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/gui/packetview.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/noncore/net/wellenreiter/gui/packetview.cpp b/noncore/net/wellenreiter/gui/packetview.cpp index f0f16ff..69438fa 100644 --- a/noncore/net/wellenreiter/gui/packetview.cpp +++ b/noncore/net/wellenreiter/gui/packetview.cpp @@ -76,11 +76,13 @@ void PacketView::add( const OPacket* p, int size ) { _packets.append( p ); } else - // limited buffer, limit = size - if ( _packets.count() < size ) - { + { // limited buffer, limit = size + while ( _packets.count() >= size ) + { + _packets.removeFirst(); + } _packets.append( p ); } _number->setMinValue( 1 ); |