diff --git a/designer-realize/src/main/java/com/fr/design/widget/ui/btn/FreeButtonDetailPane.java b/designer-realize/src/main/java/com/fr/design/widget/ui/btn/FreeButtonDetailPane.java index c2f0ed4f34..71b5d2ad57 100644 --- a/designer-realize/src/main/java/com/fr/design/widget/ui/btn/FreeButtonDetailPane.java +++ b/designer-realize/src/main/java/com/fr/design/widget/ui/btn/FreeButtonDetailPane.java @@ -3,6 +3,7 @@ package com.fr.design.widget.ui.btn; import java.awt.Component; import com.fr.form.ui.FreeButton; +import com.fr.widgettheme.util.WidgetThemeDesignerUtils; /** * 自定义按钮 @@ -16,7 +17,7 @@ public class FreeButtonDetailPane extends AbstractExtraButtonPane { @Override protected Component createCenterPane() { - buttonSytleDefinedPane = new ButtonSytleDefinedPane(); + buttonSytleDefinedPane = WidgetThemeDesignerUtils.enableWidgetEnhance() ? null : new ButtonSytleDefinedPane(); return createExtraPane(buttonSytleDefinedPane); } @@ -27,13 +28,17 @@ public class FreeButtonDetailPane extends AbstractExtraButtonPane { public void populate(FreeButton button) { super.populate(button); - buttonSytleDefinedPane.populate(button); + if (buttonSytleDefinedPane != null) { + buttonSytleDefinedPane.populate(button); + } } @Override public FreeButton update() { FreeButton button = super.update(); - buttonSytleDefinedPane.update(button); + if (buttonSytleDefinedPane != null) { + buttonSytleDefinedPane.update(button); + } return button; }