X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAlignFrame.java;h=8994743c8db269830ab9a4cc576c2f96ebebadfe;hb=53e0350c1c4464442938e4bace4e85bdbca665be;hp=092cf477ef0363b8723753141d340ada337e2c39;hpb=23d8036c19be1f358742c213d0251163e0ab67a0;p=jalview.git diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index 092cf47..8994743 100644 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -146,8 +146,6 @@ import javax.swing.JMenu; import javax.swing.JMenuItem; import javax.swing.JScrollPane; import javax.swing.SwingUtilities; -import javax.swing.event.MenuEvent; -import javax.swing.event.MenuListener; /** * DOCUMENT ME! @@ -481,35 +479,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, } }); - /* - * ensure By Label/Sequence are not selected if annotations - * have been reordered manually to CUSTOM order - */ - annotationsMenu.addMenuListener(new MenuListener() - { - @Override - public void menuSelected(MenuEvent e) - { - SequenceAnnotationOrder sortAnnotationsBy = viewport - .getSortAnnotationsBy(); - sortAnnByLabel.setSelected( - sortAnnotationsBy == SequenceAnnotationOrder.LABEL_AND_SEQUENCE); - sortAnnBySequence.setSelected( - sortAnnotationsBy == SequenceAnnotationOrder.SEQUENCE_AND_LABEL); - } - - @Override - public void menuDeselected(MenuEvent e) - { - } - - @Override - public void menuCanceled(MenuEvent e) - { - } - }); - - alignPanel.sortAnnotations(); + alignPanel.sortAnnotations(false); } /** @@ -4721,7 +4691,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, } if (isAnnotation) { - + alignPanel.sortAnnotations(false); alignPanel.adjustAnnotationHeight(); viewport.updateSequenceIdColours(); buildSortByAnnotationScoresMenu(); @@ -5442,9 +5412,9 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, * Sorts annotations and repaints the alignment */ @Override - public void sortAnnotations() + public void sortAnnotations(boolean autoCalcOnly) { - alignPanel.sortAnnotations(); + alignPanel.sortAnnotations(autoCalcOnly); alignPanel.paintAlignment(false, false); }