From: amwaterhouse Date: Fri, 27 Apr 2007 16:19:25 +0000 (+0000) Subject: FeatureRenderer mixups fixed X-Git-Tag: Release_2_3~118 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=27d88195dc8e7a4e33263857e035739287f50f03;p=jalview.git FeatureRenderer mixups fixed --- diff --git a/src/MCview/AppletPDBCanvas.java b/src/MCview/AppletPDBCanvas.java index a61ecb2..47aa94b 100755 --- a/src/MCview/AppletPDBCanvas.java +++ b/src/MCview/AppletPDBCanvas.java @@ -98,8 +98,7 @@ public class AppletPDBCanvas if(protocol.equals(jalview.io.AppletFormatAdapter.PASTE)) pdbentry.setFile("INLINE"+pdb.id); - //if (fr!=null) - // fr.featuresAdded(); + }catch(Exception ex) { ex.printStackTrace(); @@ -110,9 +109,7 @@ public class AppletPDBCanvas ssm.addStructureViewerListener(this); - colourBySequence(ap.getSequenceRenderer(), - ap.av.getShowSequenceFeatures() ? - fr : null); + colourBySequence(); int max = -10; int maxchain = -1; @@ -243,9 +240,7 @@ public class AppletPDBCanvas } } seqColoursReady = true; - colourBySequence(ap.getSequenceRenderer(), - ap.av.getShowSequenceFeatures() ? - fr : null); + colourBySequence(); redrawneeded = true; repaint(); } @@ -500,19 +495,21 @@ public class AppletPDBCanvas // This method has been taken out of PDBChain to allow // Applet and Application specific sequence renderers to be used - void colourBySequence(SequenceRenderer sr, FeatureRenderer seqcanvasfr) + void colourBySequence() { + SequenceRenderer sr = ap.getSequenceRenderer(); + StructureMapping[] mapping = ssm.getMapping(pdbentry.getFile()); boolean showFeatures = false; - if (seqcanvasfr!=null) + if (ap.av.getShowSequenceFeatures()) { if (fr == null) { fr = new jalview.appletgui.FeatureRenderer(ap.av); } - fr.transferSettings(seqcanvasfr); + fr.transferSettings(ap.getFeatureRenderer()); showFeatures = true; } @@ -1162,9 +1159,7 @@ public class AppletPDBCanvas public void updateColours(Object source) { AlignmentPanel ap = (AlignmentPanel) source; - colourBySequence(ap.getSequenceRenderer(), - ap.av.getShowSequenceFeatures() ? - fr : null); + colourBySequence(); redrawneeded = true; repaint(); } diff --git a/src/MCview/AppletPDBViewer.java b/src/MCview/AppletPDBViewer.java index 43e5197..2f8a90f 100755 --- a/src/MCview/AppletPDBViewer.java +++ b/src/MCview/AppletPDBViewer.java @@ -87,9 +87,7 @@ public class AppletPDBViewer else if (evt.getSource() == seqButton) { pdbcanvas.bysequence = true; - pdbcanvas.colourBySequence(pdbcanvas.ap.getSequenceRenderer(), - pdbcanvas.ap.av.getShowSequenceFeatures() ? - pdbcanvas.ap.getFeatureRenderer() : null); + pdbcanvas.colourBySequence(); } else if (evt.getSource() == zappo)