]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Fix for IPAL17690 : Plot 2D grid/axial marks.
authormkr <mkr@opencascade.com>
Mon, 10 Nov 2008 14:31:34 +0000 (14:31 +0000)
committermkr <mkr@opencascade.com>
Mon, 10 Nov 2008 14:31:34 +0000 (14:31 +0000)
src/Plot2d/Plot2d_ViewFrame.cxx

index e01b908952d19c42ad1b487a9379d6b8f067a8c3..82b262cf5390ee2bcb421dbf7bb885c863f90ce2 100755 (executable)
@@ -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<Plot2d_ScaleDraw*>(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) );
     }
   }
 }