mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
Variants of boards having explicit sizing mode fail when trying to add to a project
This commit is contained in:
@@ -4189,6 +4189,10 @@
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>BUG_FIX</changeType>
|
||||
<description>Do not apply any user-default property values when creating a standard datasheet model (e.g. a capacitor)</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>BUG_FIX</changeType>
|
||||
<description>Variants of boards having explicit sizing mode fail when trying to add to a project</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
</changes>
|
||||
<url>https://github.com/bancika/diy-layout-creator/releases</url>
|
||||
|
||||
Binary file not shown.
@@ -325,10 +325,11 @@ public abstract class AbstractBoard extends AbstractTransparentComponent<String>
|
||||
}
|
||||
|
||||
public void setLength(Size length) {
|
||||
if (getMode() == BoardSizingMode.Explicit) {
|
||||
setControlPoint(firstPoint, 0);
|
||||
Point2D second = new Point2D.Double(firstPoint.getX() + length.convertToPixels(), firstPoint.getY() + width.convertToPixels());
|
||||
setControlPoint(second, 1);
|
||||
if (getMode() == BoardSizingMode.Explicit && length != null && width != null) {
|
||||
setControlPoint(firstPoint, 0);
|
||||
Point2D second = new Point2D.Double(firstPoint.getX() + length.convertToPixels(),
|
||||
firstPoint.getY() + width.convertToPixels());
|
||||
setControlPoint(second, 1);
|
||||
}
|
||||
this.length = length;
|
||||
}
|
||||
@@ -343,7 +344,7 @@ public abstract class AbstractBoard extends AbstractTransparentComponent<String>
|
||||
}
|
||||
|
||||
public void setWidth(Size width) {
|
||||
if (getMode() == BoardSizingMode.Explicit) {
|
||||
if (getMode() == BoardSizingMode.Explicit && length != null && width != null) {
|
||||
setControlPoint(firstPoint, 0);
|
||||
Point2D second = new Point2D.Double(firstPoint.getX() + length.convertToPixels(), firstPoint.getY() + width.convertToPixels());
|
||||
setControlPoint(second, 1);
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user