Revision 9db64e8c src/gr/ebs/gss/client/Groups.java

b/src/gr/ebs/gss/client/Groups.java
67 67

  
68 68
	private boolean rightClicked = false;
69 69

  
70
	/**
71
	 * cached latest group selection (for selecting and expanding on refresh)
72
	 */
73
	private String selectedGroup = null;
70 74

  
71 75
	/**
72 76
	 * The tree widget that displays the groups.
......
163 167
							final TreeItem item = new TreeItem(imageItemHTML(images.groupImage(), groupList.get(i).getName()));
164 168
							item.setUserObject(groupList.get(i));
165 169
							tree.addItem(item);
166
							updateUsers( item);
170
							updateUsers(item);
167 171
						}
168 172
					}
169 173

  
......
237 241
		getCurrent().getWidget().addStyleName("gss-SelectedRow");
238 242
		setPrevious(getCurrent());
239 243
		GSS.get().setCurrentSelection(selected);
244
		//cache the latest top level node (group) for selecting and expanding on refresh
245
		if (item.getParentItem() == null)
246
			selectedGroup = item.getText();
247
		else
248
			selectedGroup = item.getParentItem().getText();
240 249
		if (rightClicked) {
241 250
			int left = item.getAbsoluteLeft() + 40;
242 251
			int top = item.getAbsoluteTop() + 20;
......
264 273
			return;
265 274

  
266 275
		setChanged(item);
267
		updateUsers( item);
276
		updateUsers(item);
268 277
	}
269 278

  
270 279
	/**
......
287 296
						final TreeItem userItem = addImageItem(groupItem, users.get(i).getName() + " <" + users.get(i).getUsername() + ">", images.permUser());
288 297
						userItem.setUserObject(users.get(i));
289 298
					}
299
					if (selectedGroup != null && groupItem.getText().equals(selectedGroup)) {
300
						onTreeItemSelected(groupItem);
301
						groupItem.setState(true);
302
					}
290 303
				}
291 304

  
292 305
				@Override

Also available in: Unified diff