Permalink
Browse files

Set selected group when a group node is picked (close #8137)

  • Loading branch information...
1 parent ed4e979 commit 02879cdf805d84d35e7972be716cb2cfe977cb82 @jburel committed Feb 24, 2012
View
4 ...nts/insight/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/TreeViewerComponent.java
@@ -257,6 +257,9 @@ private void notifyChangeGroup(long oldId)
private GroupData getContext(TreeImageDisplay node)
{
if (node == null) return null;
+ if (node.getUserObject() instanceof GroupData) {
+ return (GroupData) node.getUserObject();
+ }
TreeImageDisplay parent = node.getParentDisplay();
Object ho;
if (parent == null) {
@@ -977,7 +980,6 @@ public void onSelectedDisplay()
Browser browser = model.getSelectedBrowser();
if (browser == null) return;
TreeImageDisplay display = browser.getLastSelectedDisplay();
-
//Update the group.
GroupData group = getContext(display);
if (group != null) {

0 comments on commit 02879cd

Please sign in to comment.