Browse Source

REPORT-38954&&REPORT-38927&&REPORT-38924&&REPORT-38896 消除NPE

feature/big-screen
Yuan.Wang 4 years ago
parent
commit
8fffceb55e
  1. 4
      designer-form/src/main/java/com/fr/design/mainframe/TopXCreator.java
  2. 2
      designer-form/src/main/java/com/fr/design/mainframe/TopXCreators.java

4
designer-form/src/main/java/com/fr/design/mainframe/TopXCreator.java

@ -22,8 +22,8 @@ public class TopXCreator extends JComponent {
private final FormDesigner designer; private final FormDesigner designer;
private final XCreator creator; private final XCreator creator;
public TopXCreator(XCreator creator) { public TopXCreator(FormDesigner designer, XCreator creator) {
this.designer = WidgetPropertyPane.getInstance().getEditingFormDesigner(); this.designer = designer;
this.creator = creator; this.creator = creator;
init(); init();
} }

2
designer-form/src/main/java/com/fr/design/mainframe/TopXCreators.java

@ -59,7 +59,7 @@ public class TopXCreators extends JComponent {
XCreator[] xCreators = selectionModel.getSelection().getSelectedCreators(); XCreator[] xCreators = selectionModel.getSelection().getSelectedCreators();
for (XCreator creator : xCreators) { for (XCreator creator : xCreators) {
XWCardMainBorderLayout topXMainBorderLayout = XCreatorUtils.getTopXMainBorderLayout(creator); XWCardMainBorderLayout topXMainBorderLayout = XCreatorUtils.getTopXMainBorderLayout(creator);
TopXCreator topXCreator = topXMainBorderLayout == null ? new TopXCreator(creator) : new TopXCreator(topXMainBorderLayout); TopXCreator topXCreator = topXMainBorderLayout == null ? new TopXCreator(designer, creator) : new TopXCreator(designer, topXMainBorderLayout);
add(topXCreator); add(topXCreator);
} }
} }

Loading…
Cancel
Save