mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-11 01:32:08 +10:00
Fix toggle switch serialization of name
This commit is contained in:
+7
-3
@@ -78,6 +78,9 @@ public class MiniToggleSwitch extends AbstractTransparentComponent<ToggleSwitchT
|
|||||||
private Color bodyColor = BODY_COLOR;
|
private Color bodyColor = BODY_COLOR;
|
||||||
private Color borderColor = BORDER_COLOR;
|
private Color borderColor = BORDER_COLOR;
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
|
protected String name;
|
||||||
|
|
||||||
public MiniToggleSwitch() {
|
public MiniToggleSwitch() {
|
||||||
super();
|
super();
|
||||||
updateControlPoints();
|
updateControlPoints();
|
||||||
@@ -202,10 +205,11 @@ public class MiniToggleSwitch extends AbstractTransparentComponent<ToggleSwitchT
|
|||||||
@EditableProperty(defaultable = false)
|
@EditableProperty(defaultable = false)
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
if (super.name != null) {
|
if (super.name == null || super.name.trim().isEmpty()) {
|
||||||
return super.name;
|
super.name = name;
|
||||||
|
name = null;
|
||||||
}
|
}
|
||||||
return name;
|
return super.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user