JAL-1619 update applet.currentAlignFrame on any menu action (fixes Find
[jalview.git] / src / jalview / appletgui / AlignFrame.java
index 688ea53..b490eb6 100644 (file)
@@ -60,7 +60,6 @@ import jalview.schemes.NucleotideColourScheme;
 import jalview.schemes.PIDColourScheme;
 import jalview.schemes.PurinePyrimidineColourScheme;
 import jalview.schemes.RNAHelicesColourChooser;
-import jalview.schemes.RNAInteractionColourScheme;
 import jalview.schemes.StrandColourScheme;
 import jalview.schemes.TCoffeeColourScheme;
 import jalview.schemes.TaylorColourScheme;
@@ -970,6 +969,8 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
   @Override
   public void actionPerformed(ActionEvent evt)
   {
+    viewport.applet.currentAlignFrame = this;
+
     Object source = evt.getSource();
 
     if (source == inputText)
@@ -1230,10 +1231,10 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
     {
       changeColour(new PurinePyrimidineColourScheme());
     }
-    else if (source == RNAInteractionColour)
-    {
-      changeColour(new RNAInteractionColourScheme());
-    }
+    // else if (source == RNAInteractionColour)
+    // {
+    // changeColour(new RNAInteractionColourScheme());
+    // }
     else if (source == RNAHelixColour)
     {
       new RNAHelicesColourChooser(viewport, alignPanel);
@@ -2575,7 +2576,6 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
 
   public void changeColour(ColourSchemeI cs)
   {
-    int threshold = 0;
 
     if (cs != null)
     {
@@ -2598,15 +2598,6 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
     }
     viewport.setGlobalColourScheme(cs);
 
-    if (alignPanel.getOverviewPanel() != null)
-    {
-      alignPanel.getOverviewPanel().updateOverviewImage();
-    }
-
-    jalview.structure.StructureSelectionManager
-            .getStructureSelectionManager(viewport.applet)
-            .sequenceColoursChanged(alignPanel);
-
     alignPanel.paintAlignment(true);
   }
 
@@ -3002,10 +2993,10 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
           MessageManager.getString("label.load_features_annotations"));
 
   MenuItem outputFeatures = new MenuItem(
-          MessageManager.getString("label.export_features").concat("..."));
+          MessageManager.getString("label.export_features"));
 
   MenuItem outputAnnotations = new MenuItem(
-          MessageManager.getString("label.export_annotations").concat("..."));
+          MessageManager.getString("label.export_annotations"));
 
   MenuItem closeMenuItem = new MenuItem(
           MessageManager.getString("action.close"));
@@ -3071,7 +3062,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
 
   MenuItem purinePyrimidineColour = new MenuItem();
 
-  MenuItem RNAInteractionColour = new MenuItem();
+  // MenuItem RNAInteractionColour = new MenuItem();
 
   MenuItem RNAHelixColour = new MenuItem();
 
@@ -3254,8 +3245,8 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
     removeAllGapsMenuItem.setLabel(MessageManager
             .getString("action.remove_all_gaps"));
     removeAllGapsMenuItem.addActionListener(this);
-    removeRedundancyMenuItem.setLabel(MessageManager.getString(
-            "action.remove_redundancy").concat("..."));
+    removeRedundancyMenuItem.setLabel(MessageManager
+            .getString("action.remove_redundancy"));
     removeRedundancyMenuItem.addActionListener(this);
 
     /*
@@ -3279,7 +3270,8 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
     grpsFromSelection.addActionListener(this);
     createGroup.setLabel(MessageManager.getString("action.create_group"));
     unGroup.setLabel(MessageManager.getString("action.remove_group"));
-    annotationColumnSelection.setLabel("Select by Annotation");
+    annotationColumnSelection.setLabel(MessageManager
+            .getString("action.select_by_annotation"));
     annotationColumnSelection.addActionListener(this);
 
     /*
@@ -3309,7 +3301,7 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
     hideAllSelection.addActionListener(this);
     showAllHidden.addActionListener(this);
     featureSettings.setLabel(MessageManager
-            .getString("label.feature_settings"));
+            .getString("action.feature_settings"));
     featureSettings.addActionListener(this);
     sequenceFeatures.setLabel(MessageManager
             .getString("label.show_sequence_features"));
@@ -3441,9 +3433,9 @@ public class AlignFrame extends EmbmenuFrame implements ActionListener,
     purinePyrimidineColour.setLabel(MessageManager
             .getString("label.purine_pyrimidine"));
     purinePyrimidineColour.addActionListener(this);
-    RNAInteractionColour.setLabel(MessageManager
-            .getString("label.rna_interaction"));
-    RNAInteractionColour.addActionListener(this);
+    // RNAInteractionColour.setLabel(MessageManager
+    // .getString("label.rna_interaction"));
+    // RNAInteractionColour.addActionListener(this);
     RNAHelixColour.setLabel(MessageManager
             .getString("action.by_rna_helixes"));
     RNAHelixColour.addActionListener(this);