From 4de8dbdccf508589bec18d9a8af5799531c5807b Mon Sep 17 00:00:00 2001 From: jprocter Date: Fri, 27 Aug 2010 13:02:02 +0000 Subject: [PATCH] 1.2 compatibility --- src/jalview/ext/jmol/JalviewJmolBinding.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/jalview/ext/jmol/JalviewJmolBinding.java b/src/jalview/ext/jmol/JalviewJmolBinding.java index 8831bd6..f8fe17b 100644 --- a/src/jalview/ext/jmol/JalviewJmolBinding.java +++ b/src/jalview/ext/jmol/JalviewJmolBinding.java @@ -363,7 +363,7 @@ public abstract class JalviewJmolBinding implements StructureListener, } } } - StringBuffer selcom[] = new StringBuffer[files.length]; + String[] selcom = new String[files.length]; // generate select statements to select regions to superimpose structures { for (int pdbfnum = 0; pdbfnum < files.length; pdbfnum++) @@ -371,7 +371,7 @@ public abstract class JalviewJmolBinding implements StructureListener, String chainCd = targetC[pdbfnum]; int lpos = -1; boolean run = false; - StringBuffer molsel = (selcom[pdbfnum] = new StringBuffer()); + StringBuffer molsel = new StringBuffer(); molsel.append("{"); for (int r = 0; r < matched.length; r++) { @@ -411,8 +411,9 @@ public abstract class JalviewJmolBinding implements StructureListener, molsel.append(chainCd); molsel.append("}"); } + selcom[pdbfnum] = molsel.toString(); selectioncom.append("(("); - selectioncom.append(molsel.subSequence(1, molsel.length()-1)); + selectioncom.append(selcom[pdbfnum].substring(1, selcom[pdbfnum].length()-1)); selectioncom.append(" )& "); selectioncom.append(pdbfnum+1); selectioncom.append(".1)"); -- 1.7.10.2