From: mkr Date: Mon, 10 Nov 2008 14:31:34 +0000 (+0000) Subject: Fix for IPAL17690 : Plot 2D grid/axial marks. X-Git-Tag: V5_1_0rc1~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=439a43952c6d9b16a8d14b37e179108c6517932f;p=modules%2Fgui.git Fix for IPAL17690 : Plot 2D grid/axial marks. --- diff --git a/src/Plot2d/Plot2d_ViewFrame.cxx b/src/Plot2d/Plot2d_ViewFrame.cxx index e01b90895..82b262cf5 100755 --- a/src/Plot2d/Plot2d_ViewFrame.cxx +++ b/src/Plot2d/Plot2d_ViewFrame.cxx @@ -1854,14 +1854,14 @@ void Plot2d_Plot2d::onScaleDivChanged() QwtScaleMap map = canvasMap(axisId); double aDist = fabs(map.s2()-map.s1()) / (axisMaxMajor(axisId)*axisMaxMinor(axisId)); - QString diffPrecStr; - diffPrecStr.sprintf("%e",aDist); - int deltaEpsilon = diffPrecStr.right(diffPrecStr.length()-diffPrecStr.indexOf('e')-2).toInt(); + QString aDistStr; + aDistStr.sprintf("%e",aDist); + int aPrecision = aDistStr.right(aDistStr.length()-aDistStr.indexOf('e')-2).toInt(); QwtScaleDraw* aQwtSD = axisScaleDraw(axisId); Plot2d_ScaleDraw* aPlot2dSD = dynamic_cast(aQwtSD); - if ( !aPlot2dSD && deltaEpsilon > 6 || aPlot2dSD && aPlot2dSD->precision() != deltaEpsilon ) - setAxisScaleDraw( axisId, new Plot2d_ScaleDraw(*aQwtSD, 'f', deltaEpsilon) ); + if ( !aPlot2dSD && aPrecision > 6 || aPlot2dSD && aPlot2dSD->precision() != aPrecision ) + setAxisScaleDraw( axisId, new Plot2d_ScaleDraw(*aQwtSD, 'f', aPrecision) ); } } }