From ceadbbcdc1a89ea100281b4806e55a05c19f4b52 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 18 May 2013 18:56:03 +0200 Subject: [PATCH] Gerbview: fix bug #1176538 (incorrect flashed items size, when defined by aperture macros) --- gerbview/rs274_read_XY_and_IJ_coordinates.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gerbview/rs274_read_XY_and_IJ_coordinates.cpp b/gerbview/rs274_read_XY_and_IJ_coordinates.cpp index 85417cbfc7..f3fa381310 100644 --- a/gerbview/rs274_read_XY_and_IJ_coordinates.cpp +++ b/gerbview/rs274_read_XY_and_IJ_coordinates.cpp @@ -43,10 +43,10 @@ int scaletoIU( double aCoord, bool isMetric ) { int ret; - if( isMetric ) - ret = KiROUND( aCoord * IU_PER_MILS / 0.00254 ); - else - ret = KiROUND( aCoord * IU_PER_MILS ); + if( isMetric ) // gerber are units in mm + ret = KiROUND( aCoord * IU_PER_MM ); + else // gerber are units in inches + ret = KiROUND( aCoord * IU_PER_MILS * 1000.0); return ret; }