JAL-2778 replace setScrollValues call in AlignmentPanel::paintComponent
authorkiramt <k.mourao@dundee.ac.uk>
Mon, 6 Nov 2017 10:37:48 +0000 (10:37 +0000)
committerkiramt <k.mourao@dundee.ac.uk>
Mon, 6 Nov 2017 10:37:48 +0000 (10:37 +0000)
src/jalview/gui/AlignmentPanel.java

index 8d0fefb..ab6a781 100644 (file)
@@ -877,6 +877,13 @@ public class AlignmentPanel extends GAlignmentPanel implements
     Dimension d = getIdPanel().getIdCanvas().getPreferredSize();
     idPanelHolder.setPreferredSize(d);
     hscrollFillerPanel.setPreferredSize(new Dimension(d.width, 12));
+
+    /*
+     * set scroll bar positions - tried to remove but necessary for split panel to resize correctly
+     * though I still think this call should be elsewhere.
+     */
+    ViewportRanges ranges = av.getRanges();
+    setScrollValues(ranges.getStartRes(), ranges.getStartSeq());
   }
 
   /**