From: ageay Date: Mon, 5 Nov 2012 10:34:15 +0000 (+0000) Subject: Bug correction. When presence of markers on one Yside, and curves on different Yside X-Git-Tag: V6_6_0b1~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=842ff7ee9bff064bba883f1ceba2c2206d57a141;p=modules%2Fgui.git Bug correction. When presence of markers on one Yside, and curves on different Yside --- diff --git a/src/Plot2d/Plot2d_ViewFrame.cxx b/src/Plot2d/Plot2d_ViewFrame.cxx index 15f0e68d7..a1fb36487 100755 --- a/src/Plot2d/Plot2d_ViewFrame.cxx +++ b/src/Plot2d/Plot2d_ViewFrame.cxx @@ -1576,11 +1576,9 @@ void Plot2d_ViewFrame::getFitRangeByMarkers(double& xMin, double& xMax, return; if(picker->pMarkers.empty()) return; - bool emptyV1 = true, emptyV2 = true; foreach(QwtPlotMarker *mrker,picker->pMarkers) { bool isV2 = mrker->yAxis() == QwtPlot::yRight; - isV2 ? emptyV2 = false : emptyV1 = false; xMin = qMin( xMin, mrker->xValue() ); xMax = qMax( xMax, mrker->xValue() ); if ( isV2 ) { @@ -1604,19 +1602,6 @@ void Plot2d_ViewFrame::getFitRangeByMarkers(double& xMin, double& xMax, y2Max = y2Max == 0. ? 1 : y2Max + y2Max/10.; } } - // default values - if ( emptyV1 && emptyV2 ) { - xMin = isModeHorLinear() ? 0. : 1.; - xMax = isModeHorLinear() ? 1000. : 1e5; - } - if ( emptyV1 ) { - yMin = isModeVerLinear() ? 0. : 1.; - yMax = isModeVerLinear() ? 1000. : 1e5; - } - if ( emptyV2 ) { - y2Min = isModeVerLinear() ? 0. : 1.; - y2Max = isModeVerLinear() ? 1000. : 1e5; - } } /*!