]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Fix problem with FitAll of Plot2d view if curves in the view contain no points or...
authorvsr <vsr@opencascade.com>
Tue, 2 Mar 2010 11:28:01 +0000 (11:28 +0000)
committervsr <vsr@opencascade.com>
Tue, 2 Mar 2010 11:28:01 +0000 (11:28 +0000)
src/Plot2d/Plot2d_ViewFrame.cxx

index f6d61c474783ea33da650014b2eec1ada64e58d0..a6f439f23d1252c49886d5ee70e080cd1a215a70 100755 (executable)
@@ -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 ) {