From e47b85d0760b8573bbaa08f431297f6c4412c101 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Sun, 18 Jan 2015 15:45:29 +0000 Subject: [PATCH] JAL-1372 i18n and tweaking set/unset representative sequence --- src/jalview/gui/PopupMenu.java | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/src/jalview/gui/PopupMenu.java b/src/jalview/gui/PopupMenu.java index b300f5d..8565f9f 100644 --- a/src/jalview/gui/PopupMenu.java +++ b/src/jalview/gui/PopupMenu.java @@ -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) { -- 1.7.10.2