JAL-3446 JAL-3401 from JAL-3253-applet AlignmentPanel.holdRepaint
authorBobHanson <hansonr@stolaf.edu>
Tue, 2 Jun 2020 21:51:32 +0000 (16:51 -0500)
committerBobHanson <hansonr@stolaf.edu>
Tue, 2 Jun 2020 21:51:32 +0000 (16:51 -0500)
src/jalview/gui/AlignmentPanel.java

index eb612c8..2b6d5a0 100644 (file)
@@ -1854,4 +1854,37 @@ public class AlignmentPanel extends GAlignmentPanel implements
     return true;
   }
 
+  private boolean holdRepaint = false;
+
+  public boolean getHoldRepaint()
+  {
+    return holdRepaint;
+  }
+
+  public void setHoldRepaint(boolean b)
+  {
+    if (holdRepaint == b)
+    {
+      return;
+    }
+    holdRepaint = b;
+    if (!b)
+    {
+      repaint();
+    }
+  }
+
+  @Override
+  public void repaint()
+  {
+    if (holdRepaint)
+    {
+      // System.out.println("AP repaint holding");
+      // Platform.stackTrace();
+      return;
+    }
+    super.repaint();
+  }
+
+
 }