selection should be sent after refresh happens
authorjprocter <Jim Procter>
Wed, 12 Jan 2011 17:02:47 +0000 (17:02 +0000)
committerjprocter <Jim Procter>
Wed, 12 Jan 2011 17:02:47 +0000 (17:02 +0000)
src/jalview/gui/AlignFrame.java
src/jalview/gui/AnnotationLabels.java
src/jalview/gui/IdPanel.java

index 893802d..f74d05e 100755 (executable)
@@ -2079,6 +2079,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
     alignPanel.idPanel.idCanvas.searchResults = null;
     alignPanel.paintAlignment(true);
     PaintRefresher.Refresh(alignPanel, viewport.getSequenceSetId());
+    viewport.sendSelection();
   }
 
   /**
@@ -2104,14 +2105,15 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
     }
 
     alignPanel.paintAlignment(true);
-    viewport.sendSelection();
     PaintRefresher.Refresh(alignPanel, viewport.getSequenceSetId());
+    viewport.sendSelection();
   }
 
   public void invertColSel_actionPerformed(ActionEvent e)
   {
     viewport.invertColumnSelection();
     alignPanel.paintAlignment(true);
+    viewport.sendSelection();
   }
 
   /**
index b77fab6..740a13a 100755 (executable)
@@ -450,13 +450,13 @@ public class AnnotationLabels extends JPanel implements MouseListener,
         {
           if (evt.getClickCount() >= 2)
           {
-            // todo: make the ap scroll to the selection
+            // todo: make the ap scroll to the selection - not necessary, first click highlights/scrolls, second selects
             ap.seqPanel.ap.idPanel.highlightSearchResults(null);
             ap.av.setSelectionGroup(// new SequenceGroup(
             aa[selectedRow].groupRef); // );
-            ap.av.sendSelection();
             ap.paintAlignment(false);
             PaintRefresher.Refresh(ap, ap.av.getSequenceSetId());
+            ap.av.sendSelection();
           }
           else
           {
index 38912fd..5b689bf 100755 (executable)
@@ -419,15 +419,11 @@ public class IdPanel extends JPanel implements MouseListener,
     {
       scrollThread.running = false;
     }
-    // if (mouseDragging)
-    {
-      // always send selection message when mouse is released
-      av.sendSelection();
-
-    }
 
     mouseDragging = false;
     PaintRefresher.Refresh(this, av.getSequenceSetId());
+    // always send selection message when mouse is released
+    av.sendSelection();
   }
 
   /**