From: <ha...@us...> - 2010-08-07 16:53:30
|
Revision: 13907 http://jmol.svn.sourceforge.net/jmol/?rev=13907&view=rev Author: hansonr Date: 2010-08-07 16:53:24 +0000 (Sat, 07 Aug 2010) Log Message: ----------- Ellipsoid e.remove() Modified Paths: -------------- trunk/Jmol/src/org/jmol/shapespecial/Ellipsoids.java Modified: trunk/Jmol/src/org/jmol/shapespecial/Ellipsoids.java =================================================================== --- trunk/Jmol/src/org/jmol/shapespecial/Ellipsoids.java 2010-08-07 16:37:50 UTC (rev 13906) +++ trunk/Jmol/src/org/jmol/shapespecial/Ellipsoids.java 2010-08-07 16:53:24 UTC (rev 13907) @@ -106,13 +106,13 @@ } if (propertyName == "deleteModelAtoms") { int modelIndex = ((int[]) ((Object[]) value)[2])[0]; - for (Map.Entry<String, Ellipsoid> entry : htEllipsoids.entrySet()) { - String id = entry.getKey(); - Ellipsoid ellipsoid = entry.getValue(); + Iterator<Ellipsoid> e = htEllipsoids.values().iterator(); + while (e.hasNext()) { + Ellipsoid ellipsoid = e.next(); if (ellipsoid.modelIndex > modelIndex) ellipsoid.modelIndex--; else if (ellipsoid.modelIndex == modelIndex) - htEllipsoids.remove(id); + e.remove(); } ellipsoid = null; return; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |