From: kjvdheide Date: Mon, 11 Dec 2017 20:58:28 +0000 (+0000) Subject: JAL-2872 hide sort button in Aptx unless it's actually possible X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=ba78b66937556cf49e1dde69673413714ad4751f;p=jalview.git JAL-2872 hide sort button in Aptx unless it's actually possible --- diff --git a/src/jalview/ext/archaeopteryx/AptxInit.java b/src/jalview/ext/archaeopteryx/AptxInit.java index dfc4387..6fcc37c 100644 --- a/src/jalview/ext/archaeopteryx/AptxInit.java +++ b/src/jalview/ext/archaeopteryx/AptxInit.java @@ -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 } } diff --git a/src/jalview/ext/archaeopteryx/JalviewBinding.java b/src/jalview/ext/archaeopteryx/JalviewBinding.java index 88b2d15..6969821 100644 --- a/src/jalview/ext/archaeopteryx/JalviewBinding.java +++ b/src/jalview/ext/archaeopteryx/JalviewBinding.java @@ -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 commands = new ArrayList<>();