From: <eg...@us...> - 2006-11-05 15:52:37
|
Revision: 7242 http://svn.sourceforge.net/cdk/?rev=7242&view=rev Author: egonw Date: 2006-11-05 07:52:29 -0800 (Sun, 05 Nov 2006) Log Message: ----------- Removed getAllInOneContainer() when dragging-creating bonds. Works for two separated species too. Modified Paths: -------------- trunk/cdk/src/org/openscience/cdk/controller/AbstractController2D.java Modified: trunk/cdk/src/org/openscience/cdk/controller/AbstractController2D.java =================================================================== --- trunk/cdk/src/org/openscience/cdk/controller/AbstractController2D.java 2006-11-05 15:38:42 UTC (rev 7241) +++ trunk/cdk/src/org/openscience/cdk/controller/AbstractController2D.java 2006-11-05 15:52:29 UTC (rev 7242) @@ -1140,7 +1140,16 @@ int endX = r2dm.getPointerVectorEnd().x; int endY = r2dm.getPointerVectorEnd().y; atomInRange = getAtomInRange(endX, endY); - IAtomContainer atomCon = ChemModelManipulator.getAllInOneContainer(chemModel); + // OK, there is some repartitioning done on atomCon later, so put everything in the first AC + IAtomContainer atomCon = null; + Iterator atomCons = ChemModelManipulator.getAllAtomContainers(chemModel).iterator(); + while (atomCons.hasNext()) { + if (atomCon == null) { + atomCon = (IAtomContainer)atomCons.next(); + } else { + atomCon.add((IAtomContainer)atomCons.next()); + } + } if (atomInRange != null) { logger.debug("*** atom in range"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |