mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-30 01:04:36 +00:00
Fix min, max value setting.
This commit is contained in:
parent
4066b9ae30
commit
e3abc8b52a
@ -855,8 +855,16 @@ void View::InsertPlot( PlotData* plot, int64_t time, double val )
|
||||
{
|
||||
if( plot->data.empty() || plot->data.back().time < time )
|
||||
{
|
||||
plot->min = val;
|
||||
plot->max = val;
|
||||
if( plot->data.empty() )
|
||||
{
|
||||
plot->min = val;
|
||||
plot->max = val;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( plot->min > val ) plot->min = val;
|
||||
else if( plot->max < val ) plot->max = val;
|
||||
}
|
||||
plot->data.emplace_back( PlotItem { time, val } );
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user