From: jprocter Date: Fri, 4 Jun 2010 15:44:15 +0000 (+0000) Subject: first patch for JAL-563 - attempt to relayout annotation panel after adjusting heights X-Git-Tag: Release_2_5_1~29 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=11cce1c1e065d4430400ad414460ae643b51fbfe;p=jalview.git first patch for JAL-563 - attempt to relayout annotation panel after adjusting heights --- diff --git a/src/jalview/appletgui/AnnotationPanel.java b/src/jalview/appletgui/AnnotationPanel.java index e3ba18b..1a5697f 100755 --- a/src/jalview/appletgui/AnnotationPanel.java +++ b/src/jalview/appletgui/AnnotationPanel.java @@ -326,13 +326,18 @@ public class AnnotationPanel extends Panel implements AdjustmentListener, graphStretch = -1; graphStretchY = -1; mouseDragging = false; + if (needValidating) + { + ap.validate(); + needValidating=false; + } ap.scalePanel.mouseReleased(evt); } public void mouseClicked(MouseEvent evt) { } - + boolean needValidating=false; public void mouseDragged(MouseEvent evt) { if (graphStretch > -1) @@ -345,6 +350,7 @@ public class AnnotationPanel extends Panel implements AdjustmentListener, } graphStretchY = evt.getY(); adjustPanelHeight(); + needValidating=true; ap.paintAlignment(true); } else @@ -447,13 +453,11 @@ public class AnnotationPanel extends Panel implements AdjustmentListener, height += aa[i].height; } } - else + if (height==0) { height = 20; } - this.setSize(getSize().width, height); - repaint(); return height;