From ba78b66937556cf49e1dde69673413714ad4751f Mon Sep 17 00:00:00 2001 From: kjvdheide Date: Mon, 11 Dec 2017 20:58:28 +0000 Subject: [PATCH] JAL-2872 hide sort button in Aptx unless it's actually possible --- src/jalview/ext/archaeopteryx/AptxInit.java | 5 ++++- src/jalview/ext/archaeopteryx/JalviewBinding.java | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) 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<>(); -- 1.7.10.2