Revision: 3423
Author: ferguson.sebastian
Date: Tue Mar 30 10:53:37 2010
Log: Fixed the security editor panel which would not update correctly when
changes were made to the privileges editor panel.
http://code.google.com/p/power-architect/source/detail?r=3423
Modified:
/trunk/src/main/java/ca/sqlpower/architect/swingui/enterprise/SecurityPanel.java
=======================================
---
/trunk/src/main/java/ca/sqlpower/architect/swingui/enterprise/SecurityPanel.java
Mon Mar 29 14:08:45 2010
+++
/trunk/src/main/java/ca/sqlpower/architect/swingui/enterprise/SecurityPanel.java
Tue Mar 30 10:53:37 2010
@@ -254,7 +254,7 @@
tree.expandPath(new TreePath(groupsNode.getPath()));
}
- private void createEditPanel(SPObject groupOrUser) {
+ private void createEditPanel(final SPObject groupOrUser) {
DataEntryPanel groupOrUserEditPanel;
if (groupOrUser instanceof Group) {
groupOrUserEditPanel = new GroupEditorPanel((Group)
groupOrUser);
@@ -287,6 +287,9 @@
currentGroupOrUserEditPanel.applyChanges();
currentPrivilegesEditPanel.applyChanges();
refreshTree();
+ // So that the privileges editor panel gains a ref to
whatever grant may
+ // have been created, and will not try to keep adding the
same grant.
+ createEditPanel(groupOrUser);
}
});
@@ -316,6 +319,8 @@
lowPanel.removeAll();
lowPanel.add(bottomBuilder.getPanel());
+
+ panel.revalidate();
}
private User createUserFromPrompter() {
@@ -366,7 +371,7 @@
namePanel.add(new JLabel("Group Name"), BorderLayout.WEST);
namePanel.add(nameField, BorderLayout.EAST);
- Object[] messages = new Object[] {"Specify the Group's Name.",
namePanel};
+ Object[] messages = new Object[] {new JLabel("Specify the Group's
Name."), namePanel};
String[] options = { "Accept", "Cancel"};
int option = JOptionPane.showOptionDialog(getPanel(),
messages, "Specify the Group's Name", JOptionPane.DEFAULT_OPTION,
To unsubscribe from this group, send email to
architect-commits+unsubscribegooglegroups.com or reply to this email with the words
"REMOVE ME" as the subject.