From 01fcdf0740a4df44667977dd1dedecdb7a391a80 Mon Sep 17 00:00:00 2001 From: rinoux Date: Thu, 24 Aug 2017 11:31:46 +0800 Subject: [PATCH] =?UTF-8?q?PFC-982=20=E4=BF=AE=E5=A4=8D=E5=B7=A5=E5=85=B7?= =?UTF-8?q?=E6=A0=8F=E6=9D=83=E9=99=90=E9=A2=97=E7=B2=92=E5=BA=A6=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E6=97=B6=E5=8D=A1=E6=AD=BB=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/AuthorityEditToolBarPane.java | 31 ++++++++++--------- .../mainframe/AuthorityToolBarPane.java | 31 ++++++++++--------- 2 files changed, 32 insertions(+), 30 deletions(-) diff --git a/designer/src/com/fr/design/mainframe/AuthorityEditToolBarPane.java b/designer/src/com/fr/design/mainframe/AuthorityEditToolBarPane.java index a760e0043b..d26b2d6eb7 100644 --- a/designer/src/com/fr/design/mainframe/AuthorityEditToolBarPane.java +++ b/designer/src/com/fr/design/mainframe/AuthorityEditToolBarPane.java @@ -1,5 +1,6 @@ package com.fr.design.mainframe; +import com.fr.base.FRContext; import com.fr.design.constants.LayoutConstants; import com.fr.design.constants.UIConstants; import com.fr.design.file.HistoryTemplateListPane; @@ -20,6 +21,7 @@ import javax.swing.tree.TreePath; import java.awt.*; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; +import java.util.ArrayList; import java.util.List; /** @@ -96,23 +98,22 @@ public class AuthorityEditToolBarPane extends AuthorityPropertyPane { null || selectedPathArray == null) { return; } - for (int t = 0; t < selectedPathArray.length; t++) { - for (int i = 0; i < buttonlists.size(); i++) { - if (buttonlists.get(i).isSelected()) { - buttonlists.get(i).changeAuthorityState(selectedPathArray[t], buttonVisible.isSelected()); - authorityToolBarPane.repaint(); - } + ToolBarButton selectedButton = null; + //是否可见的checkbox + UICheckBox checkbox = (UICheckBox) e.getSource(); + for (int i = 0; i < buttonlists.size(); i++) { + if (buttonlists.get(i).isSelected()) { + selectedButton = buttonlists.get(i); } - HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().fireTargetModified(); - RolesAlreadyEditedPane.getInstance().refreshDockingView(); - UICheckBox checkbox = (UICheckBox) e.getSource(); - List btns = AuthorityEditPane.this.buttonlists; - for (int j = 0; j < btns.size(); j++) { - if (btns.get(j).isSelected()) { - //由引擎实现保存进模板报表 - authorityToolBarPane.setAuthorityWebAttr(btns.get(j).getWidget(), checkbox.isSelected(), selectedPathArray[t]); - } + } + if (selectedButton != null) { + for (int t = 0; t < selectedPathArray.length; t++) { + selectedButton.changeAuthorityState(selectedPathArray[t], buttonVisible.isSelected()); + authorityToolBarPane.repaint(); + authorityToolBarPane.setAuthorityWebAttr(selectedButton.getWidget(), checkbox.isSelected(), selectedPathArray[t]); } + HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().fireTargetModified();//模版更新 + RolesAlreadyEditedPane.getInstance().refreshDockingView();//已配置角色视图刷新 } } }; diff --git a/designer/src/com/fr/design/mainframe/AuthorityToolBarPane.java b/designer/src/com/fr/design/mainframe/AuthorityToolBarPane.java index da856173a7..53c8893ecb 100644 --- a/designer/src/com/fr/design/mainframe/AuthorityToolBarPane.java +++ b/designer/src/com/fr/design/mainframe/AuthorityToolBarPane.java @@ -219,23 +219,24 @@ public class AuthorityToolBarPane extends BasicBeanPane