JAL-3081 JAL-3199 no auto-sort of annotations after manual reordering
[jalview.git] / src / jalview / gui / AlignmentPanel.java
index 92b9a50..502ab9d 100644 (file)
@@ -804,10 +804,6 @@ public class AlignmentPanel extends GAlignmentPanel implements
   public void paintAlignment(boolean updateOverview,
           boolean updateStructures)
   {
-    final AnnotationSorter sorter = new AnnotationSorter(getAlignment(),
-            av.isShowAutocalculatedAbove());
-    sorter.sort(getAlignment().getAlignmentAnnotation(),
-            av.getSortAnnotationsBy());
     repaint();
 
     if (updateStructures)
@@ -825,6 +821,17 @@ public class AlignmentPanel extends GAlignmentPanel implements
   }
 
   /**
+   * Sorts annotations according to currently selected preference
+   */
+  void sortAnnotations()
+  {
+    final AnnotationSorter sorter = new AnnotationSorter(getAlignment(),
+            av.isShowAutocalculatedAbove());
+    sorter.sort(getAlignment().getAlignmentAnnotation(),
+            av.getSortAnnotationsBy());
+  }
+
+  /**
    * DOCUMENT ME!
    * 
    * @param g