Don't calculate min-max range of a large point quantity.

This commit is contained in:
Bartosz Taudul 2017-10-21 13:58:55 +02:00
parent 5f7dad1889
commit 31dec96d0c

View File

@ -2481,6 +2481,12 @@ int View::DrawPlots( int offset, double pxns, const ImVec2& wpos, bool hover )
double min = (*it)->val;
double max = (*it)->val;
if( std::distance( it, end ) > 1000000 )
{
min = v->min;
max = v->max;
}
else
{
auto tmp = it;
++tmp;