mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-11 01:32:08 +10:00
Right click rotation during component creation throws an error
This commit is contained in:
Binary file not shown.
+15
-13
@@ -376,20 +376,22 @@ public class InstantiationManager {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
angleProperty.readFrom(this.componentSlot);
|
for (IDIYComponent<?> component : this.componentSlot) {
|
||||||
Object value = angleProperty.getValue();
|
angleProperty.readFrom(component);
|
||||||
if (value instanceof Orientation) {
|
Object value = angleProperty.getValue();
|
||||||
angleProperty
|
if (value instanceof Orientation) {
|
||||||
.setValue(Orientation.values()[(((Orientation) value)
|
angleProperty
|
||||||
.ordinal() + 1)
|
.setValue(Orientation.values()[(((Orientation) value)
|
||||||
% Orientation.values().length]);
|
.ordinal() + 1)
|
||||||
} else if (value instanceof OrientationHV) {
|
% Orientation.values().length]);
|
||||||
angleProperty
|
} else if (value instanceof OrientationHV) {
|
||||||
.setValue(OrientationHV.values()[(((OrientationHV) value)
|
angleProperty
|
||||||
.ordinal() + 1)
|
.setValue(OrientationHV.values()[(((OrientationHV) value)
|
||||||
% OrientationHV.values().length]);
|
.ordinal() + 1)
|
||||||
|
% OrientationHV.values().length]);
|
||||||
|
}
|
||||||
|
angleProperty.writeTo(component);
|
||||||
}
|
}
|
||||||
angleProperty.writeTo(this.componentSlot);
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LOG.warn("Error trying to rotate the component", e);
|
LOG.warn("Error trying to rotate the component", e);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user