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:
+9
-5
@@ -76,7 +76,10 @@ public class MiniToggleSwitch extends AbstractTransparentComponent<ToggleSwitchT
|
||||
private Size spacing = SPACING;
|
||||
|
||||
private Color bodyColor = BODY_COLOR;
|
||||
private Color borderColor = BORDER_COLOR;
|
||||
private Color borderColor = BORDER_COLOR;
|
||||
|
||||
@Deprecated
|
||||
protected String name;
|
||||
|
||||
public MiniToggleSwitch() {
|
||||
super();
|
||||
@@ -202,10 +205,11 @@ public class MiniToggleSwitch extends AbstractTransparentComponent<ToggleSwitchT
|
||||
@EditableProperty(defaultable = false)
|
||||
@Override
|
||||
public String getName() {
|
||||
if (super.name != null) {
|
||||
return super.name;
|
||||
}
|
||||
return name;
|
||||
if (super.name == null || super.name.trim().isEmpty()) {
|
||||
super.name = name;
|
||||
name = null;
|
||||
}
|
||||
return super.name;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user