From cdec8957d4dfd65ec894e9a51bc01b079bf3f7af Mon Sep 17 00:00:00 2001 From: jprocter Date: Tue, 29 Jun 2010 16:24:11 +0000 Subject: [PATCH] jmol 12 patch - ensure we replace the correct filename in the jmol script before it gets executed --- src/jalview/gui/Jalview2XML.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/jalview/gui/Jalview2XML.java b/src/jalview/gui/Jalview2XML.java index af8b2c0..1a6024e 100755 --- a/src/jalview/gui/Jalview2XML.java +++ b/src/jalview/gui/Jalview2XML.java @@ -2510,14 +2510,15 @@ public class Jalview2XML // create a new Jmol window String state = ids[p].getStructureState(s).getContent(); StringBuffer newFileLoc = null; - if (state.indexOf("load") > -1) + int cp=0; + if ((cp=state.indexOf("load ")) > -1) { - newFileLoc = new StringBuffer(state.substring(0, state - .indexOf("\"", state.indexOf("load")) + 1)); + newFileLoc = new StringBuffer(state.substring(0, (cp=state + .indexOf("\"", cp+1)+1))); newFileLoc.append(jpdb.getFile()); newFileLoc.append(state.substring(state.indexOf("\"", - state.indexOf("load \"") + 6))); + cp+1))); } else { -- 1.7.10.2