From: <ha...@us...> - 2011-12-31 15:03:52
|
Revision: 16648 http://jmol.svn.sourceforge.net/jmol/?rev=16648&view=rev Author: hansonr Date: 2011-12-31 15:03:44 +0000 (Sat, 31 Dec 2011) Log Message: ----------- version=12.3.11_dev # bug fix: frame 0 during animation can cause exception Modified Paths: -------------- trunk/Jmol/src/org/jmol/modelset/ModelCollection.java trunk/Jmol/src/org/jmol/viewer/AnimationManager.java trunk/Jmol/src/org/jmol/viewer/Jmol.properties trunk/Jmol/src/org/jmol/viewer/Viewer.java Modified: trunk/Jmol/src/org/jmol/modelset/ModelCollection.java =================================================================== --- trunk/Jmol/src/org/jmol/modelset/ModelCollection.java 2011-12-30 18:28:13 UTC (rev 16647) +++ trunk/Jmol/src/org/jmol/modelset/ModelCollection.java 2011-12-31 15:03:44 UTC (rev 16648) @@ -4129,7 +4129,6 @@ } public long getFrameDelayMs(int i) { - return (i < models.length ? models[models[i].trajectoryBaseIndex].frameDelay : 0); + return (i < models.length && i >= 0 ? models[models[i].trajectoryBaseIndex].frameDelay : 0); } - } Modified: trunk/Jmol/src/org/jmol/viewer/AnimationManager.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/AnimationManager.java 2011-12-30 18:28:13 UTC (rev 16647) +++ trunk/Jmol/src/org/jmol/viewer/AnimationManager.java 2011-12-31 15:03:44 UTC (rev 16648) @@ -76,6 +76,8 @@ } void setCurrentModelIndex(int modelIndex, boolean clearBackgroundModel) { + if (modelIndex < 0) + setAnimationOff(false); int formerModelIndex = currentModelIndex; ModelSet modelSet = viewer.getModelSet(); int modelCount = (modelSet == null ? 0 : modelSet.getModelCount()); Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2011-12-30 18:28:13 UTC (rev 16647) +++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2011-12-31 15:03:44 UTC (rev 16648) @@ -3,6 +3,7 @@ version=12.3.11_dev +# bug fix: frame 0 during animation can cause exception # new feature: plot ramachandran -- now those points .phi and psi return values # -- load 1crn.pdb;plot ramachandran;print {2.1}.psi # new feature: LOAD .... filter "reverseModels" Modified: trunk/Jmol/src/org/jmol/viewer/Viewer.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Viewer.java 2011-12-30 18:28:13 UTC (rev 16647) +++ trunk/Jmol/src/org/jmol/viewer/Viewer.java 2011-12-31 15:03:44 UTC (rev 16648) @@ -10046,7 +10046,7 @@ modelSet.setFrameDelayMs(millis, getVisibleFramesBitSet()); } - public long getFrameDelayMs(int i) { + long getFrameDelayMs(int i) { return modelSet.getFrameDelayMs(i); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |