fixed broken plotting when a realtime plot has some curves run out of data

This commit is contained in:
Dima Kogan 2011-01-06 19:05:49 -08:00
parent 6a748ee767
commit 62f8a29500

View File

@ -556,7 +556,10 @@ sub pruneOldData
if( @$xy > 1 ) if( @$xy > 1 )
{ {
my $firstInWindow = first_index {$_->[0] >= $oldestx} @{$xy}[1..$#$xy]; my $firstInWindow = first_index {$_->[0] >= $oldestx} @{$xy}[1..$#$xy];
splice( @$xy, 1, $firstInWindow ) unless $firstInWindow == -1; if($firstInWindow == -1)
{ splice( @$xy, 1); }
else
{ splice( @$xy, 1, $firstInWindow ); }
} }
} }
} }