From: <ha...@us...> - 2011-05-19 12:41:29
|
Revision: 15491 http://jmol.svn.sourceforge.net/jmol/?rev=15491&view=rev Author: hansonr Date: 2011-05-19 12:41:23 +0000 (Thu, 19 May 2011) Log Message: ----------- version=12.1.48_dev # bug fix: cartoons with hermite level do not reposition for atom position changes or trajectories Modified Paths: -------------- trunk/Jmol/src/org/jmol/shapebio/BioShape.java trunk/Jmol/src/org/jmol/shapebio/BioShapeCollection.java trunk/Jmol/src/org/jmol/shapebio/BioShapeRenderer.java trunk/Jmol/src/org/jmol/shapebio/CartoonRenderer.java trunk/Jmol/src/org/jmol/shapebio/RocketsRenderer.java trunk/Jmol/src/org/jmol/viewer/Jmol.properties Modified: trunk/Jmol/src/org/jmol/shapebio/BioShape.java =================================================================== --- trunk/Jmol/src/org/jmol/shapebio/BioShape.java 2011-05-19 12:40:54 UTC (rev 15490) +++ trunk/Jmol/src/org/jmol/shapebio/BioShape.java 2011-05-19 12:41:23 UTC (rev 15491) @@ -200,7 +200,7 @@ bsSizeSet.set(i, isVisible); monomers[i].setShapeVisibility(flag, isVisible); shape.atoms[leadAtomIndex].setShapeVisibility(flag,isVisible); - falsifyMesh(i, true); + falsifyNearbyMesh(i); } } if (monomerCount > 1) @@ -252,12 +252,17 @@ return 0; } - void falsifyMesh(int index, boolean andNearby) { + void falsifyMesh() { if (meshReady == null) return; + for (int i = 0; i < monomerCount; i++) + meshReady[i] = false; + } + + private void falsifyNearbyMesh(int index) { + if (meshReady == null) + return; meshReady[index] = false; - if (!andNearby) - return; if (index > 0) meshReady[index - 1] = false; if (index < monomerCount - 1) @@ -326,5 +331,5 @@ ((NucleicMonomer) monomers[i]).setModelClickability(); } } - + } \ No newline at end of file Modified: trunk/Jmol/src/org/jmol/shapebio/BioShapeCollection.java =================================================================== --- trunk/Jmol/src/org/jmol/shapebio/BioShapeCollection.java 2011-05-19 12:40:54 UTC (rev 15490) +++ trunk/Jmol/src/org/jmol/shapebio/BioShapeCollection.java 2011-05-19 12:41:23 UTC (rev 15491) @@ -103,6 +103,16 @@ @Override public void setProperty(String propertyName, Object value, BitSet bsSelected) { + if (propertyName == "refreshTrajectories") { + int modelIndex = ((Integer) value).intValue(); + for (int i = bioShapes.length; --i >= 0; ){ + BioShape b = bioShapes[i]; + if (b.modelIndex == modelIndex) + b.falsifyMesh(); + } + return; + } + if (propertyName == "deleteModelAtoms") { atoms = (Atom[])((Object[])value)[1]; int modelIndex = ((int[])((Object[])value)[2])[0]; Modified: trunk/Jmol/src/org/jmol/shapebio/BioShapeRenderer.java =================================================================== --- trunk/Jmol/src/org/jmol/shapebio/BioShapeRenderer.java 2011-05-19 12:40:54 UTC (rev 15490) +++ trunk/Jmol/src/org/jmol/shapebio/BioShapeRenderer.java 2011-05-19 12:41:23 UTC (rev 15491) @@ -151,9 +151,9 @@ bsVisible.clear(); boolean haveVisible = false; + if (invalidateMesh) + bioShape.falsifyMesh(); for (int i = monomerCount; --i >= 0;) { - if (invalidateMesh) - bioShape.falsifyMesh(i, false); if ((monomers[i].shapeVisibilityFlags & myVisibilityFlag) == 0 || modelSet.isAtomHidden(leadAtomIndices[i])) continue; Modified: trunk/Jmol/src/org/jmol/shapebio/CartoonRenderer.java =================================================================== --- trunk/Jmol/src/org/jmol/shapebio/CartoonRenderer.java 2011-05-19 12:40:54 UTC (rev 15490) +++ trunk/Jmol/src/org/jmol/shapebio/CartoonRenderer.java 2011-05-19 12:41:23 UTC (rev 15491) @@ -51,14 +51,12 @@ } boolean val = viewer.getCartoonRocketFlag(); if (renderAsRockets != val) { - for (int i = 0; i < monomerCount; i++) - bioShape.falsifyMesh(i, false); + bioShape.falsifyMesh(); renderAsRockets = val; } val = !viewer.getRocketBarrelFlag(); if (renderArrowHeads != val) { - for (int i = 0; i < monomerCount; i++) - bioShape.falsifyMesh(i, false); + bioShape.falsifyMesh(); renderArrowHeads = val; } ribbonTopScreens = calcScreens(0.5f); Modified: trunk/Jmol/src/org/jmol/shapebio/RocketsRenderer.java =================================================================== --- trunk/Jmol/src/org/jmol/shapebio/RocketsRenderer.java 2011-05-19 12:40:54 UTC (rev 15490) +++ trunk/Jmol/src/org/jmol/shapebio/RocketsRenderer.java 2011-05-19 12:41:23 UTC (rev 15491) @@ -47,8 +47,7 @@ return; boolean val = !viewer.getRocketBarrelFlag(); if (renderArrowHeads != val) { - for (int i = 0; i < monomerCount; i++) - bioShape.falsifyMesh(i, false); + bioShape.falsifyMesh(); renderArrowHeads = val; } calcRopeMidPoints(false); Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2011-05-19 12:40:54 UTC (rev 15490) +++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2011-05-19 12:41:23 UTC (rev 15491) @@ -3,6 +3,7 @@ version=12.1.48_dev +# bug fix: cartoons with hermite level do not reposition for atom position changes or trajectories # bug fix: isosurface plane x=-1 (with no spaces) not accepted # bug fix: x = write("VRML") should give VRML contents and not write to disk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |