JAL-2798 tree frame is now added to active views when added to Jalview
authorkjvdheide <kjvanderheide@dundee.ac.uk>
Tue, 16 Jan 2018 18:02:02 +0000 (18:02 +0000)
committerkjvdheide <kjvanderheide@dundee.ac.uk>
Tue, 16 Jan 2018 18:02:02 +0000 (18:02 +0000)
src/jalview/ext/treeviewer/TreeViewerUtils.java

index 23118cf..9ed940a 100644 (file)
@@ -23,8 +23,8 @@ public final class TreeViewerUtils
     TreeViewerBindingI treeBinding = new JalviewBinding(treeFrame,
             jalviewAlignViewport,
             alignMappedToNodes, nodesMappedToAlign);
-    activeViews.put(treeFrame, treeBinding);
     jalviewAlignViewport.setCurrentExtTree(treeFrame.getTree());
+
     return treeBinding;
   }
 
@@ -44,6 +44,8 @@ public final class TreeViewerUtils
               new String[]
               { treeFile.getAbsolutePath() });
     }
+    activeViews.put(treeFrame, treeFrame.getViewBinding());
+
     treeFrame.addFrameToJalview(frameTitle, true, width, height, true,
             true);
     return treeFrame;