JAL-2778 Reinstate id width adjuster
authorkiramt <k.mourao@dundee.ac.uk>
Thu, 25 Jan 2018 13:49:36 +0000 (13:49 +0000)
committerkiramt <k.mourao@dundee.ac.uk>
Thu, 25 Jan 2018 13:49:36 +0000 (13:49 +0000)
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.