JAL-2872 hide sort button in Aptx unless it's actually possible
authorkjvdheide <kjvanderheide@dundee.ac.uk>
Mon, 11 Dec 2017 20:58:28 +0000 (20:58 +0000)
committerkjvdheide <kjvanderheide@dundee.ac.uk>
Mon, 11 Dec 2017 20:58:28 +0000 (20:58 +0000)
src/jalview/ext/archaeopteryx/AptxInit.java
src/jalview/ext/archaeopteryx/JalviewBinding.java

index dfc4387..6fcc37c 100644 (file)
@@ -592,7 +592,10 @@ 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");
+        menu.add(sortByTree);
+        sortByTree.setVisible(false); // don't show unless it's actually
+                                      // possible
       }
 
     }
index 88b2d15..6969821 100644 (file)
@@ -582,9 +582,9 @@ public final class JalviewBinding
   }
 
   @Override
-  public void sortByTree_actionPerformed()// modify for Aptx
+  public void sortByTree_actionPerformed()
   {
-
+    //
     // if (treeCanvas.applyToAllViews)
     // {
     // final ArrayList<CommandI> commands = new ArrayList<>();