Browse Source

REPORT-11394 二次选择某些场景下可能删除失败

final/10.0
yaoh.wu 6 years ago
parent
commit
28b56fd047
  1. 12
      designer-base/src/main/java/com/fr/design/remote/ui/AuthorityListControlPane.java

12
designer-base/src/main/java/com/fr/design/remote/ui/AuthorityListControlPane.java

@ -253,23 +253,17 @@ public class AuthorityListControlPane extends BasicPane {
* @param authorities authority
*/
public void setAuthority(List<DesignAuthority> authorities) {
if (authorities == null || authorities.isEmpty()) {
return;
}
DefaultListModel<DesignAuthority> model = (DefaultListModel<DesignAuthority>) authorityList.getModel();
model.clear();
if (authorities != null && !authorities.isEmpty()) {
model.clear();
for (DesignAuthority authority : authorities) {
model.addElement(authority);
}
int size = model.getSize() - 1;
authorityList.setSelectedIndex(size);
authorityList.ensureIndexIsVisible(size);
}
authorityList.revalidate();
authorityList.repaint();
}

Loading…
Cancel
Save