Browse Source

REPORT-24478 预定义控件设置不可用不可见后预览无效

feature/big-screen
Joe.Jiang 5 years ago committed by Joe.Jiang
parent
commit
3a8b21762d
  1. 11
      designer-realize/src/main/java/com/fr/design/widget/WidgetPane.java

11
designer-realize/src/main/java/com/fr/design/widget/WidgetPane.java

@ -248,14 +248,15 @@ public class WidgetPane extends AbstractAttrNoScrollPane implements ItemListener
return null; return null;
} }
//为了保持预定义控件的配置界面不变,返回类型必须为NameWidget
private NameWidget getPredefinedWidget(String name) { private NameWidget getPredefinedWidget(String name) {
NameWidget nameWidget = new NameWidget(name); NameWidget nameWidget = new NameWidget(name);
WidgetInfoConfig mgr = WidgetInfoConfig.getInstance(); WidgetInfoConfig mgr = WidgetInfoConfig.getInstance();
WidgetConfig widgetConfig = mgr.getWidgetConfig(name); Widget widget = mgr.getWidgetConfig(name).toWidget();
nameWidget.setEnabled(widgetConfig.toWidget().isEnabled()); nameWidget.setEnabled(widget.isEnabled());
nameWidget.setVisible(widgetConfig.toWidget().isVisible()); nameWidget.setVisible(widget.isVisible());
nameWidget.setWidgetName(widgetConfig.toWidget().getWidgetName()); nameWidget.setWidgetName(widget.getWidgetName());
nameWidget.setWidgetPrivilegeControl(widget.getWidgetPrivilegeControl());
return nameWidget; return nameWidget;
} }

Loading…
Cancel
Save