From 2912677bca1eb90cc9de85172b68a2293cc1a8c4 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Thu, 17 Nov 2005 15:33:26 +0000 Subject: [PATCH] Graphics must be set from nullFrame --- src/jalview/appletgui/AlignmentPanel.java | 7 +++++++ src/jalview/appletgui/OverviewPanel.java | 1 + src/jalview/appletgui/SequenceRenderer.java | 1 + 3 files changed, 9 insertions(+) diff --git a/src/jalview/appletgui/AlignmentPanel.java b/src/jalview/appletgui/AlignmentPanel.java index 9fb6e62..07f5661 100755 --- a/src/jalview/appletgui/AlignmentPanel.java +++ b/src/jalview/appletgui/AlignmentPanel.java @@ -499,6 +499,13 @@ public class AlignmentPanel extends Panel implements AdjustmentListener seqPanel.seqCanvas.repaint(); scalePanel.repaint(); annotationPanel.repaint(); + + if (getBounds() == g.getClipBounds()) + { + if (overviewPanel != null) + overviewPanel.updateOverviewImage(); + } + } protected Panel sequenceHolderPanel = new Panel(); diff --git a/src/jalview/appletgui/OverviewPanel.java b/src/jalview/appletgui/OverviewPanel.java index 6164468..23bfd09 100755 --- a/src/jalview/appletgui/OverviewPanel.java +++ b/src/jalview/appletgui/OverviewPanel.java @@ -55,6 +55,7 @@ public class OverviewPanel sr = new SequenceRenderer(av); + sr.graphics = nullFrame.getGraphics(); sr.renderGaps( false ); //fr = new FeatureRenderer(av); //fr.transparency = ap.seqPanel.seqCanvas.getFeatureRenderer().transparency; diff --git a/src/jalview/appletgui/SequenceRenderer.java b/src/jalview/appletgui/SequenceRenderer.java index b985cea..217a67d 100755 --- a/src/jalview/appletgui/SequenceRenderer.java +++ b/src/jalview/appletgui/SequenceRenderer.java @@ -62,6 +62,7 @@ public class SequenceRenderer } } + Image offscreen; public Color findSequenceColour(SequenceI seq, int i) { allGroups = av.alignment.findAllGroups(seq); -- 1.7.10.2