mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-07 12:24:58 +10:00
'Schaller Megaswitch' not rendered correctly when rotated for 90 or 270 degrees
This commit is contained in:
@@ -405,6 +405,10 @@
|
||||
<changeType>BUG_FIX</changeType>
|
||||
<description>Dragging a component from the component tree to the canvas sometimes does not work as expected without clicking on it first and then dragging it</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>BUG_FIX</changeType>
|
||||
<description>'Schaller Megaswitch' not rendered correctly when rotated for 90 or 270 degrees</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
</changes>
|
||||
<url>https://github.com/bancika/diy-layout-creator/releases</url>
|
||||
</org.diylc.appframework.update.Version>
|
||||
|
||||
@@ -237,9 +237,9 @@ public class FreewayBlade extends AbstractAngledComponent<String> implements ISw
|
||||
|
||||
// Rotate if needed
|
||||
if (theta != 0) {
|
||||
// Skip the last two because terminals are already rotated
|
||||
// Skip the last one because terminals are already rotated
|
||||
AffineTransform rotation = AffineTransform.getRotateInstance(theta, x, y);
|
||||
for (int i = 0; i < body.length - 2; i++) {
|
||||
for (int i = 0; i < body.length - 1; i++) {
|
||||
Shape shape = body[i];
|
||||
Area area = (Area) shape;
|
||||
area.transform(rotation);
|
||||
|
||||
+2
-2
@@ -277,9 +277,9 @@ public class SchallerMegaSwitch extends AbstractAngledComponent<String> implemen
|
||||
|
||||
// Rotate if needed
|
||||
if (theta != 0) {
|
||||
// Skip the last two because terminals are already rotated
|
||||
// Skip the last one because terminals are already rotated
|
||||
AffineTransform rotation = AffineTransform.getRotateInstance(theta, x, y);
|
||||
for (int i = 0; i < body.length - 2; i++) {
|
||||
for (int i = 0; i < body.length - 1; i++) {
|
||||
Shape shape = body[i];
|
||||
Area area = (Area) shape;
|
||||
area.transform(rotation);
|
||||
|
||||
Reference in New Issue
Block a user