JAL-1640 JAL-966 is for boolean getter on AlignViewportI
[jalview.git] / src / jalview / gui / PopupMenu.java
index b300f5d..bccbf8c 100644 (file)
@@ -1516,7 +1516,8 @@ public class PopupMenu extends JPopupMenu
         editSequence_actionPerformed(actionEvent);
       }
     });
-    makeReferenceSeq.setText("Mark as representative");
+    makeReferenceSeq.setText(MessageManager
+            .getString("label.mark_as_representative"));
     makeReferenceSeq.addActionListener(new ActionListener()
     {
       
@@ -1946,28 +1947,29 @@ public class PopupMenu extends JPopupMenu
     }
     refresh();
   }
-protected void makeReferenceSeq_actionPerformed(ActionEvent actionEvent)
-{
-  if (!ap.av.getAlignment().hasSeqrep())
-  {
-    // initialise the display flags so the user sees something happen
-    ap.av.setDisplayReferenceSeq(true);
-    ap.av.setColourByReferenceSeq(true);
-    ap.av.getAlignment().setSeqrep(sequence);
-  }
-  else
+
+  protected void makeReferenceSeq_actionPerformed(ActionEvent actionEvent)
   {
-    if (ap.av.getAlignment().getSeqrep() == sequence)
+    if (!ap.av.getAlignment().hasSeqrep())
     {
-      ap.av.getAlignment().setSeqrep(null);
+      // initialise the display flags so the user sees something happen
+      ap.av.setDisplayReferenceSeq(true);
+      ap.av.setColourByReferenceSeq(true);
+      ap.av.getAlignment().setSeqrep(sequence);
     }
     else
     {
-      ap.av.getAlignment().setSeqrep(sequence);
+      if (ap.av.getAlignment().getSeqrep() == sequence)
+      {
+        ap.av.getAlignment().setSeqrep(null);
+      }
+      else
+      {
+        ap.av.getAlignment().setSeqrep(sequence);
+      }
     }
+    refresh();
   }
-  refresh();
-}
 
   protected void hideInsertions_actionPerformed(ActionEvent actionEvent)
   {
@@ -2188,14 +2190,14 @@ protected void makeReferenceSeq_actionPerformed(ActionEvent actionEvent)
       int threshold = SliderPanel.setPIDSliderSource(ap, sg.cs, getGroup()
               .getName());
 
-      sg.cs.setThreshold(threshold, ap.av.getIgnoreGapsConsensus());
+      sg.cs.setThreshold(threshold, ap.av.isIgnoreGapsConsensus());
 
       SliderPanel.showPIDSlider();
     }
     else
     // remove PIDColouring
     {
-      sg.cs.setThreshold(0, ap.av.getIgnoreGapsConsensus());
+      sg.cs.setThreshold(0, ap.av.isIgnoreGapsConsensus());
     }
 
     refresh();