From 7e0fae20f770d46f8f4d1dcd7f09f6c365a85bc7 Mon Sep 17 00:00:00 2001 From: zack Date: Fri, 24 Mar 2017 11:24:07 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-2242=20=E5=A1=AB=E6=8A=A5=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E8=AE=BE=E7=BD=AE=E7=9A=84=E8=8B=A5=E5=B9=B2=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer/src/com/fr/design/webattr/EditToolBar.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/designer/src/com/fr/design/webattr/EditToolBar.java b/designer/src/com/fr/design/webattr/EditToolBar.java index ac1295934..938fd4509 100644 --- a/designer/src/com/fr/design/webattr/EditToolBar.java +++ b/designer/src/com/fr/design/webattr/EditToolBar.java @@ -329,15 +329,16 @@ public class EditToolBar extends BasicPane { private JavaScriptActionPane javaScriptPane; private ExportToolBarProvider[] exportToolBarProviders; - private ChangeListener changeListener = new ChangeListener() { - public void stateChanged(ChangeEvent e) { + private ActionListener actionListener = new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { if (isVerify.isSelected()) { failSubmit.setVisible(true); } else { failSubmit.setVisible(false); + failSubmit.setSelected(false); } } - }; public ButtonPane() { @@ -481,7 +482,7 @@ public class EditToolBar extends BasicPane { submitPane.add(isVerify); submitPane.add(failSubmit); submitPane.add(isCurSheet); - isVerify.addChangeListener(changeListener); + isVerify.addActionListener(actionListener); return submitPane; } @@ -573,6 +574,9 @@ public class EditToolBar extends BasicPane { card.show(centerPane, "submit"); Submit submit = ((Submit) widget); this.isVerify.setSelected(submit.isVerify()); + if (!submit.isVerify()) { + this.failSubmit.setVisible(false); + } this.failSubmit.setSelected(submit.isFailVerifySubmit()); this.isCurSheet.setSelected(submit.isOnlySubmitSelect()); }