X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fappletgui%2FAnnotationLabels.java;h=07c3e0af34527769886e942e9adf08384d1c4e9b;hb=b5667f39acdf309cd92881b73edfda591e0acaf4;hp=d8e7007c31ddf427ef99a6073dee1a9726f0fef5;hpb=3ab70c7242fba39a5106deb39882648bacfc2ba6;p=jalview.git diff --git a/src/jalview/appletgui/AnnotationLabels.java b/src/jalview/appletgui/AnnotationLabels.java index d8e7007..07c3e0a 100755 --- a/src/jalview/appletgui/AnnotationLabels.java +++ b/src/jalview/appletgui/AnnotationLabels.java @@ -23,6 +23,7 @@ package jalview.appletgui; import jalview.analysis.AlignmentUtils; import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.Annotation; +import jalview.datamodel.HiddenColumns; import jalview.datamodel.SequenceGroup; import jalview.datamodel.SequenceI; import jalview.util.MessageManager; @@ -51,7 +52,6 @@ import java.awt.event.MouseListener; import java.awt.event.MouseMotionListener; import java.util.Arrays; import java.util.Collections; -import java.util.Vector; public class AnnotationLabels extends Panel implements ActionListener, MouseListener, MouseMotionListener @@ -202,7 +202,9 @@ public class AnnotationLabels extends Panel } else if (evt.getActionCommand().equals(COPYCONS_SEQ)) { - SequenceI cons = av.getConsensusSeq(); + SequenceGroup group = aa[selectedRow].groupRef; + SequenceI cons = group == null ? av.getConsensusSeq() + : group.getConsensusSeq(); if (cons != null) { copy_annotseqtoclipboard(cons); @@ -455,8 +457,8 @@ public class AnnotationLabels extends Panel .getAlignmentAnnotation(); // DETECT RIGHT MOUSE BUTTON IN AWT - if ((evt.getModifiers() - & InputEvent.BUTTON3_MASK) == InputEvent.BUTTON3_MASK) + if ((evt.getModifiersEx() + & InputEvent.BUTTON3_DOWN_MASK) == InputEvent.BUTTON3_DOWN_MASK) { PopupMenu popup = new PopupMenu( @@ -532,7 +534,7 @@ public class AnnotationLabels extends Panel MessageManager.getString("label.ignore_gaps_consensus"), (aa[selectedRow].groupRef != null) ? aa[selectedRow].groupRef - .getIgnoreGapsConsensus() + .isIgnoreGapsConsensus() : ap.av.isIgnoreGapsConsensus()); final AlignmentAnnotation aaa = aa[selectedRow]; cbmi.addItemListener(new ItemListener() @@ -843,8 +845,8 @@ public class AnnotationLabels extends Panel + "\t" + sq.getSequenceAsString() + "\n"); if (av.hasHiddenColumns()) { - jalview.appletgui.AlignFrame.copiedHiddenColumns = new Vector<>( - av.getAlignment().getHiddenColumns().getHiddenColumnsCopy()); + jalview.appletgui.AlignFrame.copiedHiddenColumns = new HiddenColumns( + av.getAlignment().getHiddenColumns()); } }