\r
private boolean rightClicked = false;\r
\r
+ /**\r
+ * cached latest group selection (for selecting and expanding on refresh)\r
+ */\r
+ private String selectedGroup = null;\r
\r
/**\r
* The tree widget that displays the groups.\r
final TreeItem item = new TreeItem(imageItemHTML(images.groupImage(), groupList.get(i).getName()));\r
item.setUserObject(groupList.get(i));\r
tree.addItem(item);\r
- updateUsers( item);\r
+ updateUsers(item);\r
}\r
}\r
\r
getCurrent().getWidget().addStyleName("gss-SelectedRow");\r
setPrevious(getCurrent());\r
GSS.get().setCurrentSelection(selected);\r
+ //cache the latest top level node (group) for selecting and expanding on refresh\r
+ if (item.getParentItem() == null)\r
+ selectedGroup = item.getText();\r
+ else\r
+ selectedGroup = item.getParentItem().getText();\r
if (rightClicked) {\r
int left = item.getAbsoluteLeft() + 40;\r
int top = item.getAbsoluteTop() + 20;\r
return;\r
\r
setChanged(item);\r
- updateUsers( item);\r
+ updateUsers(item);\r
}\r
\r
/**\r
final TreeItem userItem = addImageItem(groupItem, users.get(i).getName() + " <" + users.get(i).getUsername() + ">", images.permUser());\r
userItem.setUserObject(users.get(i));\r
}\r
+ if (selectedGroup != null && groupItem.getText().equals(selectedGroup)) {\r
+ onTreeItemSelected(groupItem);\r
+ groupItem.setState(true);\r
+ }\r
}\r
\r
@Override\r