From: <ha...@us...> - 2013-06-26 22:24:17
|
Revision: 18363 http://sourceforge.net/p/jmol/code/18363 Author: hansonr Date: 2013-06-26 22:24:11 +0000 (Wed, 26 Jun 2013) Log Message: ----------- ___JmolVersion="13.1.17_dev_2013.06.26" bug fix: CrystalReader broken code: MagRes/CASTEP reader upgrades Modified Paths: -------------- trunk/Jmol/src/org/jmol/adapter/readers/xtal/CrystalReader.java trunk/Jmol/src/org/jmol/util/TextFormat.java trunk/Jmol/src/org/jmol/viewer/Jmol.properties Modified: trunk/Jmol/src/org/jmol/adapter/readers/xtal/CrystalReader.java =================================================================== --- trunk/Jmol/src/org/jmol/adapter/readers/xtal/CrystalReader.java 2013-06-26 09:10:59 UTC (rev 18362) +++ trunk/Jmol/src/org/jmol/adapter/readers/xtal/CrystalReader.java 2013-06-26 22:24:11 UTC (rev 18363) @@ -31,7 +31,6 @@ import org.jmol.adapter.smarter.Atom; import org.jmol.util.BS; import org.jmol.util.Eigen; -import org.jmol.util.Escape; import org.jmol.util.Logger; import org.jmol.util.Matrix3f; import org.jmol.util.P3; Modified: trunk/Jmol/src/org/jmol/util/TextFormat.java =================================================================== --- trunk/Jmol/src/org/jmol/util/TextFormat.java 2013-06-26 09:10:59 UTC (rev 18362) +++ trunk/Jmol/src/org/jmol/util/TextFormat.java 2013-06-26 22:24:11 UTC (rev 18363) @@ -561,11 +561,11 @@ } /** - * Does a clean replace of strFrom in str with strTo. - * This method has far faster performance than just String.replace() - * when str does not contain strFrom, but is about 15% slower when it does. - * (Note that String.replace(CharSeq, CharSeq) was introduced in Java 1.5. - * Finally getting around to using it in Jmol!) + * Does a clean replace of strFrom in str with strTo. This method has far + * faster performance than just String.replace() when str does not contain + * strFrom, but is about 15% slower when it does. (Note that + * String.replace(CharSeq, CharSeq) was introduced in Java 1.5. Finally + * getting around to using it in Jmol!) * * @param str * @param strFrom @@ -573,9 +573,15 @@ * @return replaced string */ public static String simpleReplace(String str, String strFrom, String strTo) { - return (str == null || strFrom.length() == 0 || str.indexOf(strFrom) < 0 - ? str : str.replace(strFrom, strTo)); + if (str == null || strFrom.length() == 0 || str.indexOf(strFrom) < 0) + return str; + boolean isOnce = (strTo.indexOf(strFrom) >= 0); + do { + str = str.replace(strFrom, strTo); + } while (!isOnce && str.indexOf(strFrom) >= 0); + return str; } + // static { // long t = System.currentTimeMillis(); Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2013-06-26 09:10:59 UTC (rev 18362) +++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2013-06-26 22:24:11 UTC (rev 18363) @@ -9,8 +9,10 @@ # The quotes above look odd for a parameter file, but they are # important for the JavaScript version of Jmol. + ___JmolVersion="13.1.17_dev_2013.06.26" +bug fix: CrystalReader broken code: MagRes/CASTEP reader upgrades bug fix: PyMOL movie start frame bug fix: PyMOL putty broken This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |