X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fext%2Farchaeopteryx%2FAptxInit.java;h=9d248d0046dd5c53ce355877ae1a96934434a8e8;hb=b39c593c3799dc8a2ec799ce015c86d201d43da7;hp=dfc438715fabe11d225be882a66dbf8c58be8886;hpb=60e7c072c017a2a8cec9cc39139b3fca8680d0eb;p=jalview.git diff --git a/src/jalview/ext/archaeopteryx/AptxInit.java b/src/jalview/ext/archaeopteryx/AptxInit.java index dfc4387..9d248d0 100644 --- a/src/jalview/ext/archaeopteryx/AptxInit.java +++ b/src/jalview/ext/archaeopteryx/AptxInit.java @@ -496,7 +496,7 @@ public final class AptxInit MainFrame aptxApp = Archaeopteryx.createApplication(aptxTree, APTX_CONFIG, treeTitle); - adaptAptxGui(aptxApp); + LoadedTreeSequenceAssociation bindAptxNodes = new LoadedTreeSequenceAssociation( jalviewAlignport.getAlignment().getSequencesArray(), aptxTree); bindAptxNodes.associateLeavesToSequences(); @@ -506,6 +506,7 @@ public final class AptxInit bindAptxNodes.getNodesWithAlignment()); bindTreeViewFrameToJalview(aptxApp); + adaptAptxGui(aptxApp); return aptxApp; } @@ -592,7 +593,22 @@ public final class AptxInit else if (menu.getText().contains("View")) { menu.addSeparator(); - menu.add(new JMenuItem("Sort alignment by tree")); + JMenuItem sortByTree = new JMenuItem("Sort alignment by tree"); + JMenuItem refreshJalview = new JMenuItem( + "Filter alignment to show only currently visible sequences"); + + refreshJalview.setFont(menu.getFont()); + + menu.add(sortByTree); + menu.add(refreshJalview); + + sortByTree.setFont(menu.getFont()); + sortByTree.setVisible(false); // don't show unless it's actually + // possible + + refreshJalview.addActionListener(activeAptx.get(aptxFrame)); + + } }