mirror of
https://github.com/dkogan/feedgnuplot.git
synced 2025-05-06 06:21:16 +08:00
fixed broken plotting when a realtime plot has some curves run out of data
This commit is contained in:
parent
6a748ee767
commit
62f8a29500
@ -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 ); }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user