From: <ha...@us...> - 2010-10-23 16:24:54
|
Revision: 14532 http://jmol.svn.sourceforge.net/jmol/?rev=14532&view=rev Author: hansonr Date: 2010-10-23 16:24:47 +0000 (Sat, 23 Oct 2010) Log Message: ----------- version=12.1.17_dev # load "" does not work after loading a SET of models using load DATA Modified Paths: -------------- trunk/Jmol/src/org/jmol/adapter/readers/cifpdb/CifReader.java trunk/Jmol/src/org/jmol/modelset/ModelCollection.java trunk/Jmol/src/org/jmol/script/ScriptEvaluator.java trunk/Jmol/src/org/jmol/viewer/Jmol.properties Modified: trunk/Jmol/src/org/jmol/adapter/readers/cifpdb/CifReader.java =================================================================== --- trunk/Jmol/src/org/jmol/adapter/readers/cifpdb/CifReader.java 2010-10-22 22:35:09 UTC (rev 14531) +++ trunk/Jmol/src/org/jmol/adapter/readers/cifpdb/CifReader.java 2010-10-23 16:24:47 UTC (rev 14532) @@ -337,7 +337,6 @@ private void processLoopBlock() throws Exception { tokenizer.getTokenPeeked(); //loop_ String str = tokenizer.peekToken(); - System.out.println(str); if (str == null) return; if (str.startsWith("_atom_site_") || str.startsWith("_atom_site.")) { Modified: trunk/Jmol/src/org/jmol/modelset/ModelCollection.java =================================================================== --- trunk/Jmol/src/org/jmol/modelset/ModelCollection.java 2010-10-22 22:35:09 UTC (rev 14531) +++ trunk/Jmol/src/org/jmol/modelset/ModelCollection.java 2010-10-23 16:24:47 UTC (rev 14532) @@ -3905,9 +3905,13 @@ } public String getInlineData(int modelIndex) { - StringBuffer data = models[modelIndex >= 0 ? modelIndex : modelCount - 1].loadScript; - if (data == null) - return ""; + StringBuffer data = null; + if (modelIndex >= 0) + data = models[modelIndex].loadScript; + else + for (modelIndex = modelCount; --modelIndex >= 0; ) + if ((data = models[modelIndex].loadScript).length() > 0) + break; int pt = data.lastIndexOf("data \""); if (pt < 0) return null; Modified: trunk/Jmol/src/org/jmol/script/ScriptEvaluator.java =================================================================== --- trunk/Jmol/src/org/jmol/script/ScriptEvaluator.java 2010-10-22 22:35:09 UTC (rev 14531) +++ trunk/Jmol/src/org/jmol/script/ScriptEvaluator.java 2010-10-23 16:24:47 UTC (rev 14532) @@ -8337,8 +8337,6 @@ loadScript.append(" "); if (isVariable || isInline) { loadScript.append(Escape.escape(filename)); - if (isVariable) - sOptions += "\n }"; } else if (!isData) { if (!filename.equals("string") && !filename.equals("string[]")) loadScript.append("/*file*/"); @@ -8347,7 +8345,10 @@ loadScript.append(Escape.escape((localName != null ? localName : "$FILENAME$"))); } - loadScript.append(sOptions); + if (sOptions.length() > 0) + loadScript.append(" /*options*/ ").append(sOptions); + if (isVariable) + loadScript.append("\n }"); htParams.put("loadScript", loadScript); } setCursorWait(true); Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2010-10-22 22:35:09 UTC (rev 14531) +++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2010-10-23 16:24:47 UTC (rev 14532) @@ -3,6 +3,7 @@ version=12.1.17_dev +# load "" does not work after loading a SET of models using load DATA # bug fix: CIF reader cannot read files with _space_group_symop_operation_xyz field # -------------------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |