From: jprocter Date: Fri, 18 Feb 2011 17:16:39 +0000 (+0000) Subject: call to release any explicit event handler references and fix for occasional arrayInd... X-Git-Tag: Release_2_7~247 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=d7dbe16f76a17f582d7819378bac121fab061316;p=jalview.git call to release any explicit event handler references and fix for occasional arrayIndexOutOfboundsErrors --- diff --git a/src/jalview/structure/StructureSelectionManager.java b/src/jalview/structure/StructureSelectionManager.java index 0e4ec2f..492907b 100644 --- a/src/jalview/structure/StructureSelectionManager.java +++ b/src/jalview/structure/StructureSelectionManager.java @@ -215,7 +215,7 @@ public class StructureSelectionManager // allocate enough slots to store the mapping from positions in // sequence[s] to the associated chain - int[][] mapping = new int[maxChain.sequence.getEnd() + 2][2]; + int[][] mapping = new int[sequence[s].findPosition(sequence[s].getLength()) + 2][2]; int resNum = -10000; int index = 0; @@ -259,6 +259,17 @@ public class StructureSelectionManager public void removeStructureViewerListener(Object svl, String[] pdbfiles) { listeners.removeElement(svl); + if (svl instanceof SequenceListener) + { + for (int i=0;i