mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-11 01:32:08 +10:00
Fixed grid alignment issues with ruler marks when both the ruler and
grid is in metric units
This commit is contained in:
@@ -39,7 +39,7 @@ public class CalcUtils {
|
||||
*/
|
||||
public static int roundToGrid(double x, Size gridSpacing) {
|
||||
double grid = gridSpacing.convertToPixels();
|
||||
return (int) (Math.round(1f * x / grid) * grid);
|
||||
return (int) Math.round((Math.round(1f * x / grid) * grid));
|
||||
}
|
||||
|
||||
public static void snapPointToGrid(Point point, Size gridSpacing) {
|
||||
|
||||
@@ -3018,6 +3018,10 @@
|
||||
<changeType>NEW_FEATURE</changeType>
|
||||
<description>Added mirrored pin display options for "DIL IC"</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>IMPROVEMENT</changeType>
|
||||
<description>Fixed grid alignment issues with ruler marks when both the ruler and grid is in metric units</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>IMPROVEMENT</changeType>
|
||||
<description>Standardize how folded transistors are displayed - updated TO-92 and TO-1 packages</description>
|
||||
|
||||
Reference in New Issue
Block a user