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;
}
//为了保持预定义控件的配置界面不变,返回类型必须为NameWidget
private NameWidget getPredefinedWidget(String name) {
NameWidget nameWidget = new NameWidget(name);
WidgetInfoConfig mgr = WidgetInfoConfig.getInstance();
WidgetConfig widgetConfig = mgr.getWidgetConfig(name);
nameWidget.setEnabled(widgetConfig.toWidget().isEnabled());
nameWidget.setVisible(widgetConfig.toWidget().isVisible());
nameWidget.setWidgetName(widgetConfig.toWidget().getWidgetName());
Widget widget = mgr.getWidgetConfig(name).toWidget();
nameWidget.setEnabled(widget.isEnabled());
nameWidget.setVisible(widget.isVisible());
nameWidget.setWidgetName(widget.getWidgetName());
nameWidget.setWidgetPrivilegeControl(widget.getWidgetPrivilegeControl());
return nameWidget;
}

Loading…
Cancel
Save