From 79ea6e00041c342feb718d7c1f9284074ab87de5 Mon Sep 17 00:00:00 2001 From: kerry Date: Wed, 11 Jul 2018 15:49:58 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-9582=20=E3=80=90=E9=98=BB=E5=A1=9E?= =?UTF-8?q?=E3=80=91=E3=80=9010.0=E4=BA=8C=E8=BD=AE=E5=9B=9E=E5=BD=92?= =?UTF-8?q?=E3=80=91=E8=AE=BE=E8=AE=A1=E5=99=A8=E8=8F=9C=E5=8D=95=E6=A0=8F?= =?UTF-8?q?-=E6=9C=8D=E5=8A=A1=E5=99=A8-=E6=8E=A7=E4=BB=B6=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E6=B7=BB=E5=8A=A0=E9=A2=84=E5=AE=9A=E4=B9=89=E6=8E=A7?= =?UTF-8?q?=E4=BB=B6=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/widget/WidgetEventPane.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/widget/WidgetEventPane.java b/designer-realize/src/main/java/com/fr/design/widget/WidgetEventPane.java index 2e445fe0b..c1a412d93 100644 --- a/designer-realize/src/main/java/com/fr/design/widget/WidgetEventPane.java +++ b/designer-realize/src/main/java/com/fr/design/widget/WidgetEventPane.java @@ -34,13 +34,16 @@ import com.fr.stable.Nameable; import javax.swing.*; public class WidgetEventPane extends ObjectUIControlPane { + private static final Selection NO_SELECTION = new CellSelection(-1, -1, -1, -1); - private Selection selection; + private Selection selection = NO_SELECTION; public WidgetEventPane(ElementCasePane pane) { super(pane); this.setNameListEditable(false); - selection = pane.getSelection(); + if(pane != null){ + selection = pane.getSelection(); + } setBorder(BorderFactory.createEmptyBorder(10, 0, 15, 0)); }