X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAlignmentPanel.java;h=c606b9fcca7bb782ca8d770e288b818a0f85b6b4;hb=23d8036c19be1f358742c213d0251163e0ab67a0;hp=502ab9dc14ff63a1ae9a6a0b949e351f58462dfd;hpb=4e52fac08f31a714cb9d706178b10364c8f02d69;p=jalview.git diff --git a/src/jalview/gui/AlignmentPanel.java b/src/jalview/gui/AlignmentPanel.java index 502ab9d..c606b9f 100644 --- a/src/jalview/gui/AlignmentPanel.java +++ b/src/jalview/gui/AlignmentPanel.java @@ -21,6 +21,7 @@ package jalview.gui; import jalview.analysis.AnnotationSorter; +import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder; import jalview.api.AlignViewportI; import jalview.api.AlignmentViewPanel; import jalview.bin.Cache; @@ -821,14 +822,18 @@ public class AlignmentPanel extends GAlignmentPanel implements } /** - * Sorts annotations according to currently selected preference + * Sorts annotations according to currently selected preferences. Does nothing + * if currently set to 'Custom' (manual) ordering. */ void sortAnnotations() { - final AnnotationSorter sorter = new AnnotationSorter(getAlignment(), - av.isShowAutocalculatedAbove()); - sorter.sort(getAlignment().getAlignmentAnnotation(), - av.getSortAnnotationsBy()); + SequenceAnnotationOrder sortBy = av.getSortAnnotationsBy(); + if (sortBy != SequenceAnnotationOrder.CUSTOM) + { + final AnnotationSorter sorter = new AnnotationSorter(getAlignment(), + av.isShowAutocalculatedAbove()); + sorter.sort(getAlignment().getAlignmentAnnotation(), sortBy); + } } /**