From: vsr Date: Tue, 2 Mar 2010 11:28:01 +0000 (+0000) Subject: Fix problem with FitAll of Plot2d view if curves in the view contain no points or... X-Git-Tag: V5_1_4a1~21 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=600a86c6b87bd3ae2cab491bb52a8dd14ad6ae24;p=modules%2Fgui.git Fix problem with FitAll of Plot2d view if curves in the view contain no points or only one point: additional change - replace std::min(), std::max() by qMin(), qMax(). --- diff --git a/src/Plot2d/Plot2d_ViewFrame.cxx b/src/Plot2d/Plot2d_ViewFrame.cxx index f6d61c474..a6f439f23 100755 --- a/src/Plot2d/Plot2d_ViewFrame.cxx +++ b/src/Plot2d/Plot2d_ViewFrame.cxx @@ -844,10 +844,10 @@ void Plot2d_ViewFrame::getFitRangeByCurves(double& xMin, double& xMax, xMax = yMax = y2Max = -1e150; } empty = false; - xMin = std::min( xMin, it.value()->getMinX() ); - xMax = std::max( xMax, it.value()->getMaxX() ); - yMin = std::min( yMin, it.value()->getMinY() ); - yMax = std::max( yMax, it.value()->getMaxY() ); + xMin = qMin( xMin, it.value()->getMinX() ); + xMax = qMax( xMax, it.value()->getMaxX() ); + yMin = qMin( yMin, it.value()->getMinY() ); + yMax = qMax( yMax, it.value()->getMaxY() ); } } if ( xMin == xMax ) {