Fixed the issue with 'Add Flexible Leads' functionality placing the flexible leads wrong on leaded components (e.g. resistors, capacitors...)

This commit is contained in:
Bane Stojkovic
2022-03-07 19:21:58 +01:00
parent b646d90179
commit d513cb2667
10 changed files with 27 additions and 11 deletions
@@ -9,6 +9,6 @@
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_EXCLUDE_TEST_CODE" value="true"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.diylc.RegressionTestRunner"/>
<stringAttribute key="org.eclipse.jdt.launching.MODULE_NAME" value="diylc-swing"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="&quot;C:\Users\bancika\Documents\GitHub\diy-layout-creator\diylc-regression-data&quot; PREPARE user-files"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="&quot;C:\Users\bancika\Documents\GitHub\diy-layout-creator\diylc-regression-data&quot; TEST user-files"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="diylc-swing"/>
</launchConfiguration>
+1 -1
View File
@@ -10,7 +10,7 @@
<property name="jar.dir" value="${build.dir}/jar" />
<property name="report.dir" value="${build.dir}/junitreport" />
<property name="main.class" value="org.diylc.DIYLCStarter" />
<property name="diylc.version" value="4.22.0" />
<property name="diylc.version" value="4.22.1" />
<property name="osx.jre8.path" value="jre\osx\jre8u321\Contents\Home\" />
+2
View File
@@ -26,6 +26,8 @@ A-O-I REGULATOR
AWG
And
C-B-E BJT
C1
C2
Check Trace Proximity
D-G-S JFET
D-G-S MOSFET
@@ -37,6 +37,16 @@
<update_contact>nbenitezl_AT_gmail.com</update_contact>
<content_rating type="oars-1.1"/>
<releases>
<release version="4.22.1" date="2022-03-07">
<description>
<ul>
<li>[Bug Fix] Fixed backwards compatibility issue with older files failing to open because of an issue with 'Tape Measure' component serialization</li>
<li>[Bug Fix] Fixed the issue with 'Add Flexible Leads' functionality placing the flexible leads wrong on leaded components (e.g. resistors, capacitors...)</li>
<li>[Bug Fix] Fixed display issue with Trace layer showing up as Wiring in the menu</li>
</ul>
</description>
<url>https://github.com/bancika/diy-layout-creator/releases/tag/v4.22.1</url>
</release>
<release version="4.22.0" date="2022-03-03">
<description>
<ul>
Binary file not shown.
Binary file not shown.
@@ -471,8 +471,6 @@ public class CanvasPlugin implements IPlugIn, ClipboardOwner {
public void zoom(int direction) {
Point mousePosBefore = canvasPanel.getMousePosition(true);
Point locationBefore = canvasPanel.getLocation();
int relativeX = (int) (mousePosBefore.getX() + locationBefore.getX());
int relativeY = (int) (mousePosBefore.getY() + locationBefore.getY());
// change zoom level
double oldZoom = plugInPort.getZoomLevel();
@@ -504,6 +502,8 @@ public class CanvasPlugin implements IPlugIn, ClipboardOwner {
if (selectionBounds == null) {
// center to cursor
int relativeX = (int) (mousePosBefore.getX() + locationBefore.getX());
int relativeY = (int) (mousePosBefore.getY() + locationBefore.getY());
Point desiredPos = new Point((int) (1d * mousePosBefore.getX() / oldZoom * newZoom),
(int) (1d * mousePosBefore.getY() / oldZoom * newZoom));
int newHorizontalPos = (int) (desiredPos.getX() - relativeX);