Browse Source

REPORT-36624 自定义控件在参数面板的可见可用设置保存无效

bugfix/10.0
Yyming 4 years ago
parent
commit
0eb1ea0211
  1. 18
      designer-base/src/main/java/com/fr/start/BaseDesigner.java
  2. 8
      designer-form/src/main/java/com/fr/design/designer/creator/XNameWidget.java

18
designer-base/src/main/java/com/fr/start/BaseDesigner.java

@ -64,14 +64,11 @@ public abstract class BaseDesigner extends ToolBarMenuDock {
@Override @Override
public void on(Event event, Null param) { public void on(Event event, Null param) {
EventDispatcher.stopListen(this); EventDispatcher.stopListen(this);
UIUtil.invokeLaterIfNeeded(new Runnable() { UIUtil.invokeLaterIfNeeded(() -> {
@Override
public void run() {
// 打开上次的文件 // 打开上次的文件
showDesignerFrame(false); showDesignerFrame(false);
DesignerLaunchStatus.setStatus(DesignerLaunchStatus.OPEN_LAST_FILE_COMPLETE); DesignerLaunchStatus.setStatus(DesignerLaunchStatus.OPEN_LAST_FILE_COMPLETE);
}
}); });
} }
}); });
@ -90,12 +87,7 @@ public abstract class BaseDesigner extends ToolBarMenuDock {
} }
public void show() { public void show() {
UIUtil.invokeLaterIfNeeded(new Runnable() { UIUtil.invokeLaterIfNeeded(() -> refreshTemplateTree());
@Override
public void run() {
refreshTemplateTree();
}
});
} }
private void refreshTemplateTree() { private void refreshTemplateTree() {

8
designer-form/src/main/java/com/fr/design/designer/creator/XNameWidget.java

@ -68,9 +68,11 @@ public class XNameWidget extends XWidgetCreator {
Widget widget; Widget widget;
if (wc != null && (widget= wc.toWidget()) != null) { if (wc != null && (widget= wc.toWidget()) != null) {
editor = XCreatorUtils.createXCreator(widget); editor = XCreatorUtils.createXCreator(widget);
Widget currentWidget = toData(); NameWidget currentWidget = toData();
currentWidget.setVisible(widget.isVisible()); if (currentWidget.isNeedDefaultAttr()) {
currentWidget.setEnabled(widget.isEnabled()); currentWidget.setVisible(widget.isVisible());
currentWidget.setEnabled(widget.isEnabled());
}
this.setBorder(null); this.setBorder(null);
} else { } else {
this.setBorder(DEFALUTBORDER); this.setBorder(DEFALUTBORDER);

Loading…
Cancel
Save