mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
Fix toggle switch serialization of name
This commit is contained in:
+9
-5
@@ -76,7 +76,10 @@ public class MiniToggleSwitch extends AbstractTransparentComponent<ToggleSwitchT
|
|||||||
private Size spacing = SPACING;
|
private Size spacing = SPACING;
|
||||||
|
|
||||||
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();
|
||||||
@@ -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