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
public void on(Event event, Null param) {
EventDispatcher.stopListen(this);
UIUtil.invokeLaterIfNeeded(new Runnable() {
@Override
public void run() {
UIUtil.invokeLaterIfNeeded(() -> {
// 打开上次的文件
showDesignerFrame(false);
DesignerLaunchStatus.setStatus(DesignerLaunchStatus.OPEN_LAST_FILE_COMPLETE);
}
// 打开上次的文件
showDesignerFrame(false);
DesignerLaunchStatus.setStatus(DesignerLaunchStatus.OPEN_LAST_FILE_COMPLETE);
});
}
});
@ -90,12 +87,7 @@ public abstract class BaseDesigner extends ToolBarMenuDock {
}
public void show() {
UIUtil.invokeLaterIfNeeded(new Runnable() {
@Override
public void run() {
refreshTemplateTree();
}
});
UIUtil.invokeLaterIfNeeded(() -> 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;
if (wc != null && (widget= wc.toWidget()) != null) {
editor = XCreatorUtils.createXCreator(widget);
Widget currentWidget = toData();
currentWidget.setVisible(widget.isVisible());
currentWidget.setEnabled(widget.isEnabled());
NameWidget currentWidget = toData();
if (currentWidget.isNeedDefaultAttr()) {
currentWidget.setVisible(widget.isVisible());
currentWidget.setEnabled(widget.isEnabled());
}
this.setBorder(null);
} else {
this.setBorder(DEFALUTBORDER);

Loading…
Cancel
Save