repaint image buffer height change (JAL-564) and ensure annotation panel
authorjprocter <jprocter@compbio.dundee.ac.uk>
Wed, 29 Jun 2011 16:56:57 +0000 (17:56 +0100)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Wed, 29 Jun 2011 16:56:57 +0000 (17:56 +0100)
height drag events do not result in annotation row reordering (JAL-769)

src/jalview/appletgui/AnnotationLabels.java

index 64f5d0b..1a6400d 100755 (executable)
@@ -330,7 +330,7 @@ public class AnnotationLabels extends Panel implements ActionListener,
 
   public void mouseReleased(MouseEvent evt)
   {
-    if (!dragCancelled)
+    if (!resizePanel && !dragCancelled)
     {
       int start = selectedRow;
 
@@ -647,7 +647,8 @@ public class AnnotationLabels extends Panel implements ActionListener,
   public void paint(Graphics g)
   {
     int w = getSize().width;
-    if (image == null || w != image.getWidth(this))
+    int h = getSize().height;
+    if (image == null || w != image.getWidth(this) || h!=image.getHeight(this) )
     {
       image = createImage(w, ap.annotationPanel.getSize().height);
     }