*/
public void fastPaint(int horizontal, int vertical)
{
+
// System.err.println("<<SeqCanvas fastPaint " + fastpainting + " "
// + horizontal + " " + vertical);
// effectively:
int startSeq = ranges.getStartSeq();
int endRes = ranges.getEndRes();
int endSeq = ranges.getEndSeq();
+ if (av.isFastPaintDisabled())
+ {
+ fastPaint = false;
+ }
// System.err.println(">>SeqCanvas paintComponent " + fastPaint + "\n"
// + getVisibleRect() + "\n" + g.getClipBounds());
drawSelectionGroup((Graphics2D) g, startRes, endRes, startSeq,
endSeq);
fastPaint = false;
- //System.out.println("SeqCanvas fast paint");
+ // System.out.println("SeqCanvas fast paint");
}
else
{
-
- System.out.println("SeqCanvas full paint");
+ // System.out.println("SeqCanvas full paint");
/*
* img is a cached version of the last view we drew.
* If we have no img or the size has changed, make a new one
return labelWidthWest;
}
- /**
- * Ensure that a full paint is done next, for whatever reason. This was
- * necessary for JavaScript; apparently in Java the timing is just right on
- * multiple threads (EventQueue-0, Consensus, Conservation) that we can get
- * away with one fast paint before the others, but this ensures that in the
- * end we get a full paint. Problem arose in relation to copy/paste, where the
- * paste was not finalized with a full paint.
- *
- * @author hansonr 2019.04.17
- */
- public void clearFastPaint()
- {
- fastPaint = false;
- }
}
*/
private boolean followHighlight = true;
+ private boolean disableFastPaint; // BH 2019.04.18
+
+ /**
+ * BH 2019.04.18 When gap filling is on and a modification is made to fill
+ * those, we need to disallow fast painting for paste just once
+ *
+ * @return
+ */
+ public boolean isFastPaintDisabled()
+ {
+ boolean ret = disableFastPaint;
+ disableFastPaint = false;
+ return ret;
+ }
+
/**
* Property change listener for changes in alignment
*
{
if (isPadGaps())
{
- alignment.padGaps();
+ if (alignment.padGaps())
+ {
+ // the new alignment has been modified -- can't fast paint
+ disableFastPaint = true;
+ }
}
if (autoCalculateConsensus)
{