Browse Source

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

Merge in DESIGN/design from ~YYMING/design:bugfix/10.0 to bugfix/10.0

* commit '49c2630bfb9a251cbf4722b1e900cb7b8aa9bcfc':
  REPORT-36624 新的解决方案
  REPORT-36624 自定义控件在参数面板的可见可用设置保存无效
bugfix/10.0
Yyming 4 years ago
parent
commit
70cf44a907
  1. 12
      designer-base/src/main/java/com/fr/start/BaseDesigner.java
  2. 3
      designer-form/src/main/java/com/fr/design/designer/creator/XNameWidget.java

12
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(this::refreshTemplateTree);
@Override
public void run() {
refreshTemplateTree();
}
});
} }
private void refreshTemplateTree() { private void refreshTemplateTree() {

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

@ -68,9 +68,6 @@ 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();
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