- seq = av.alignment.getSequenceAt(index);
- }
- else
- {
- hiddenRow = true;
- }
- }
- else
- {
- seq = av.alignment.getSequenceAt(lastrow);
- }
-
- for (col = 0; col < width; col++)
- {
- if ((int) (col * sampleCol) == lastcol
- && (int) (row * sampleRow) == lastrow)
- {
- sameCol++;
- continue;
- }
-
- lastcol = (int) (col * sampleCol);
-
- if (seq.getLength() > lastcol)
- {
- color = sr.getResidueBoxColour(seq, lastcol);
-
- if (av.showSequenceFeatures)
- {
- color = fr.findFeatureColour(color, seq, lastcol);
- }
- }
- else
- {
- color = Color.white; // White
- }
-
- if (hiddenRow
- || (av.hasHiddenColumns && !av.getColumnSelection()
- .isVisible(lastcol)))
- {
- color = color.darker().darker();
- }
-
- mg.setColor(color);
- if (sameCol == 1 && sameRow == 1)
- {
- mg.drawLine(xstart, ystart, xstart, ystart);
- }
- else
- {
- mg.fillRect(xstart, ystart, sameCol, sameRow);
- }
-
- xstart = col;
- sameCol = 1;
- }
- lastrow = (int) (row * sampleRow);
- ystart = row;
- sameRow = 1;
- }
-
- if (av.conservation != null)
+ // check for conservation annotation to make sure overview works for DNA too
+ if (av.isShowAnnotation()
+ && (av.getAlignmentConservationAnnotation() != null))