From: <ha...@us...> - 2011-03-25 04:19:13
|
Revision: 15341 http://jmol.svn.sourceforge.net/jmol/?rev=15341&view=rev Author: hansonr Date: 2011-03-25 04:19:06 +0000 (Fri, 25 Mar 2011) Log Message: ----------- version=12.1.41_dev # bug fix: {*}.resno, .atomno, etc. where the property is an integer returns sum, not average Modified Paths: -------------- trunk/Jmol/src/org/jmol/modelset/Atom.java trunk/Jmol/src/org/jmol/script/ScriptEvaluator.java trunk/Jmol/src/org/jmol/viewer/Jmol.properties Modified: trunk/Jmol/src/org/jmol/modelset/Atom.java =================================================================== --- trunk/Jmol/src/org/jmol/modelset/Atom.java 2011-03-25 02:39:55 UTC (rev 15340) +++ trunk/Jmol/src/org/jmol/modelset/Atom.java 2011-03-25 04:19:06 UTC (rev 15341) @@ -1175,7 +1175,7 @@ case Token.polymerlength: return atom.getPolymerLength(); case Token.radius: - // the comparitor uses rasmol radius, unfortunately, for integers + // the comparator uses rasmol radius, unfortunately, for integers return atom.getRasMolRadius(); case Token.resno: return atom.getResno(); Modified: trunk/Jmol/src/org/jmol/script/ScriptEvaluator.java =================================================================== --- trunk/Jmol/src/org/jmol/script/ScriptEvaluator.java 2011-03-25 02:39:55 UTC (rev 15340) +++ trunk/Jmol/src/org/jmol/script/ScriptEvaluator.java 2011-03-25 04:19:06 UTC (rev 15341) @@ -1584,13 +1584,12 @@ case Token.sum2: case Token.stddev: break; - case Token.average: - if (sum / n == (int) (sum / n)) - return Integer.valueOf((int) (sum / n)); case Token.sum: + return Integer.valueOf((int) sum); default: - if (sum == (int) sum) - return Integer.valueOf((int) sum); + if (sum / n == (int) (sum / n)) + return Integer.valueOf((int) (sum / n)); + return new Float(sum / n); } } switch (minmaxtype) { Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2011-03-25 02:39:55 UTC (rev 15340) +++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2011-03-25 04:19:06 UTC (rev 15341) @@ -3,6 +3,7 @@ version=12.1.41_dev +# bug fix: {*}.resno, .atomno, etc. where the property is an integer returns sum, not average # bug fix: closing a prompt dialog with ESCAPE can cause crash; should return "null" # bug fix: conflicting (Edit) selectMenu removed # -- can't have two menus with exactly the same name, or language will only update one This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |