Right-click rotate while placing components on the canvas now applies to

tube sockets as wel
This commit is contained in:
Branislav Stojkovic
2019-01-07 23:55:51 +01:00
parent fc33be65ab
commit 767df37286
2 changed files with 12 additions and 1 deletions
@@ -378,7 +378,8 @@ public class InstantiationManager {
PropertyWrapper angleProperty = null;
for (PropertyWrapper propertyWrapper : properties) {
if (propertyWrapper.getType().getName().equals(Orientation.class.getName())
|| propertyWrapper.getType().getName().equals(OrientationHV.class.getName())) {
|| propertyWrapper.getType().getName().equals(OrientationHV.class.getName())
|| propertyWrapper.getName().equalsIgnoreCase("angle")) {
angleProperty = propertyWrapper;
break;
}
@@ -397,6 +398,12 @@ public class InstantiationManager {
} else if (value instanceof OrientationHV) {
angleProperty.setValue(OrientationHV.values()[(((OrientationHV) value).ordinal() + 1)
% OrientationHV.values().length]);
} else if (angleProperty.getName().equalsIgnoreCase("angle")) {
int angle = (Integer) angleProperty.getValue();
angle += 90;
if (angle >= 360)
angle -= 360;
angleProperty.setValue(angle);
}
angleProperty.writeTo(component);
}
+4
View File
@@ -2106,6 +2106,10 @@
<changeType>NEW_FEATURE</changeType>
<description>DIYLC now comes with predefined component variants out-of-the box, in addition to user-specific variants</description>
</org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change>
<changeType>NEW_FEATURE</changeType>
<description>Right-click rotate while placing components on the canvas now applies to tube sockets as wel</description>
</org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change>
<changeType>BUG_FIX</changeType>
<description>Fix "Mouse Wheel Zoom" feature that got broken in 3.46.1</description>