- // if there is annotation, scale the alignment and annotation
- // separately
- if (od.getGraphHeight() > 0)
- {
- BufferedImage topImage = lastMiniMe.getSubimage(0, 0,
- od.getWidth(), od.getSequencesHeight());
- BufferedImage bottomImage = lastMiniMe.getSubimage(0,
- od.getSequencesHeight(), od.getWidth(),
- od.getGraphHeight());
-
- // must be done at this point as we rely on using old width/height
- // above, and new width/height below
- od.setWidth(getWidth());
- od.setHeight(getHeight());
-
- // stick the images back together so lastMiniMe is consistent in the
- // event of a repaint - BUT probably not thread safe
- lastMiniMe = new BufferedImage(od.getWidth(), od.getHeight(),
- BufferedImage.TYPE_INT_RGB);
- Graphics lg = lastMiniMe.getGraphics();
- lg.drawImage(topImage, 0, 0, od.getWidth(),
- od.getSequencesHeight(), null);
- lg.drawImage(bottomImage, 0, od.getSequencesHeight(),
- od.getWidth(), od.getGraphHeight(), this);
- lg.dispose();
- }
- else
- {
- od.setWidth(getWidth());
- od.setHeight(getHeight());
- }
-
- // make sure the box is in the right place
- od.setBoxPosition(av.getAlignment().getHiddenSequences(),
- av.getAlignment().getHiddenColumns());
+
+ lastMiniMe = null;
+ return;
+ // // if there is annotation, scale the alignment and annotation
+ // // separately
+ // if (od.getGraphHeight() <= 0 && od.getSequencesHeight() <= 0)
+ // {
+ // od.setWidth(w);
+ // od.setHeight(h);
+ // return;
+ // }
+ // try
+ // {
+ // BufferedImage topImage = lastMiniMe.getSubimage(0, 0,
+ // od.getWidth(), od.getSequencesHeight());
+ //
+ // BufferedImage bottomImage = lastMiniMe.getSubimage(0,
+ // od.getSequencesHeight(), od.getWidth(),
+ // od.getGraphHeight());
+ //
+ // // must be done at this point as we rely on using old width/height
+ // // above, and new width/height below
+ // od.setWidth(w);
+ // od.setHeight(h);
+ //
+ // // stick the images back together so lastMiniMe is consistent in the
+ // // event of a repaint - BUT probably not thread safe
+ //
+ // // right -- this fails with fast user action.
+ //
+ // lastMiniMe = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
+ // Graphics lg = lastMiniMe.getGraphics();
+ // lg.drawImage(topImage, 0, 0, w, od.getSequencesHeight(), null);
+ // lg.drawImage(bottomImage, 0, od.getSequencesHeight(), w,
+ // od.getGraphHeight(), this);
+ // lg.dispose();
+ //
+ // } catch (RasterFormatException e)
+ // {
+ // System.out.println("OC Raster Exception " + lastMiniMe.getWidth()
+ // + "/" + w + "," + lastMiniMe.getHeight() + "/" + h + " "
+ // + od.getSequencesHeight() + " " + od.getGraphHeight());
+ // }
+ // BH 2019: removed -- this is now taken care of using vpbox in
+ // OverviewDimension
+ // // make sure the box is in the right place
+ // od.setBoxPosition(av.getAlignment().getHiddenSequences(),
+ // av.getAlignment().getHiddenColumns());