From 0ec05d5a2b604aaedcca284a696a4fc71707b444 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Wed, 16 Nov 2005 17:02:14 +0000 Subject: [PATCH 1/1] Highlight doesnt use offset --- src/MCview/AppletPDBCanvas.java | 2 +- src/MCview/PDBCanvas.java | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/MCview/AppletPDBCanvas.java b/src/MCview/AppletPDBCanvas.java index 1df39fa..4c62b60 100755 --- a/src/MCview/AppletPDBCanvas.java +++ b/src/MCview/AppletPDBCanvas.java @@ -99,7 +99,7 @@ public class AppletPDBCanvas extends Panel implements MouseListener, MouseMotion highlightBond1 = null; highlightBond2 = null; - int index = ii - mainchain.seqstart - mainchain.offset+1; + int index = ii - mainchain.seqstart; if(index <0 ) return; diff --git a/src/MCview/PDBCanvas.java b/src/MCview/PDBCanvas.java index f0806a8..33dfb8b 100755 --- a/src/MCview/PDBCanvas.java +++ b/src/MCview/PDBCanvas.java @@ -557,13 +557,13 @@ public class PDBCanvas extends JPanel implements MouseListener, MouseMotionListe if(highlightBond1!=null && highlightBond1==tmpBond) { - g.setColor(tmpBond.endCol.brighter().brighter().brighter()); + g.setColor(tmpBond.endCol.brighter().brighter().brighter().brighter()); drawLine(g, xmid, ymid, xend, yend); } if(highlightBond2!=null && highlightBond2==tmpBond) { - g.setColor(tmpBond.startCol.brighter().brighter().brighter()); + g.setColor(tmpBond.startCol.brighter().brighter().brighter().brighter()); drawLine(g, xstart, ystart, xmid, ymid); } @@ -846,7 +846,8 @@ public class PDBCanvas extends JPanel implements MouseListener, MouseMotionListe highlightBond1 = null; highlightBond2 = null; - int index = ii - mainchain.seqstart - mainchain.offset+1; + int index = ii - mainchain.seqstart; + if(index <0 ) return; -- 1.7.10.2