JAL-2778 Reinstate id width adjuster
[jalview.git] / src / jalview / gui / AlignmentPanel.java
index ab6a781..8801506 100644 (file)
@@ -874,10 +874,14 @@ public class AlignmentPanel extends GAlignmentPanel implements
   @Override
   public void paintComponent(Graphics g)
   {
+    invalidate(); // needed so that the id width adjuster works correctly
+
     Dimension d = getIdPanel().getIdCanvas().getPreferredSize();
     idPanelHolder.setPreferredSize(d);
     hscrollFillerPanel.setPreferredSize(new Dimension(d.width, 12));
 
+    validate(); // needed so that the id width adjuster works correctly
+
     /*
      * set scroll bar positions - tried to remove but necessary for split panel to resize correctly
      * though I still think this call should be elsewhere.