// the overview is being calculated
private volatile boolean restart = false;
+ private volatile boolean updaterunning = false;
+
private BufferedImage miniMe;
private BufferedImage lastMiniMe = null;
* Signals to drawing code that the associated alignment viewport
* has changed and a redraw will be required
*/
- public void restartDraw()
+ public boolean restartDraw()
{
- restart = true;
+ synchronized (this)
+ {
+ if (updaterunning)
+ {
+ restart = true;
+ }
+ else
+ {
+ updaterunning = true;
+ }
+ return restart;
+ }
}
public void draw(boolean showSequenceFeatures, boolean showAnnotation)
}
else
{
+ updaterunning = false;
lastMiniMe = miniMe;
}
}