mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
Fixed backwards compatibility issue with older files failing to open because of an issue with 'Mini Toggle Switch' component serialization
This commit is contained in:
+16
-10
@@ -69,7 +69,9 @@ public class MiniToggleSwitch extends AbstractTransparentComponent<ToggleSwitchT
|
||||
private static Color BORDER_COLOR = BODY_COLOR.darker();
|
||||
private static Color CIRCLE_COLOR = Color.decode("#FFFFAA");
|
||||
|
||||
protected Point2D[] controlPoints = new Point2D[] {new Point2D.Double(0, 0)};
|
||||
protected Point2D[] controlPoints = new Point2D[] {new Point2D.Double(0, 0)};
|
||||
@Deprecated
|
||||
protected String name;
|
||||
transient protected Shape body;
|
||||
protected ToggleSwitchType switchType = ToggleSwitchType.DPDT;
|
||||
private OrientationHV orientation = OrientationHV.VERTICAL;
|
||||
@@ -197,15 +199,19 @@ public class MiniToggleSwitch extends AbstractTransparentComponent<ToggleSwitchT
|
||||
body = null;
|
||||
}
|
||||
|
||||
@EditableProperty
|
||||
@Override
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
@EditableProperty(defaultable = false)
|
||||
@Override
|
||||
public String getName() {
|
||||
if (super.name != null) {
|
||||
return super.name;
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setName(String name) {
|
||||
super.name = name;
|
||||
this.name = null;
|
||||
}
|
||||
|
||||
@EditableProperty(name = "Type")
|
||||
|
||||
Reference in New Issue
Block a user