From: <eg...@us...> - 2008-11-26 20:13:44
|
Revision: 13321 http://cdk.svn.sourceforge.net/cdk/?rev=13321&view=rev Author: egonw Date: 2008-11-26 20:13:40 +0000 (Wed, 26 Nov 2008) Log Message: ----------- Removed duplicate API for adding benzene Modified Paths: -------------- cdk/branches/jchempaint-primary/src/main/org/openscience/cdk/controller/AddRingModule.java cdk/branches/jchempaint-primary/src/main/org/openscience/cdk/controller/IChemModelRelay.java Modified: cdk/branches/jchempaint-primary/src/main/org/openscience/cdk/controller/AddRingModule.java =================================================================== --- cdk/branches/jchempaint-primary/src/main/org/openscience/cdk/controller/AddRingModule.java 2008-11-26 17:54:02 UTC (rev 13320) +++ cdk/branches/jchempaint-primary/src/main/org/openscience/cdk/controller/AddRingModule.java 2008-11-26 20:13:40 UTC (rev 13321) @@ -48,7 +48,10 @@ private void addRingToEmptyCanvas() { if (this.benzene) { - chemModelRelay.addRing(ringSize, true); + Point2d randomPoint = new Point2d(0,0); + chemModelRelay.addAtom("C", randomPoint); + IAtom closestAtom = chemModelRelay.getClosestAtom(randomPoint); + chemModelRelay.addPhenyl(closestAtom); } else { chemModelRelay.addRing(ringSize); } @@ -56,7 +59,7 @@ private void addRingToAtom(IAtom closestAtom) { if (benzene) { - chemModelRelay.addRing(closestAtom, ringSize, true); + chemModelRelay.addPhenyl(closestAtom); } else { chemModelRelay.addRing(closestAtom, ringSize); } Modified: cdk/branches/jchempaint-primary/src/main/org/openscience/cdk/controller/IChemModelRelay.java =================================================================== --- cdk/branches/jchempaint-primary/src/main/org/openscience/cdk/controller/IChemModelRelay.java 2008-11-26 17:54:02 UTC (rev 13320) +++ cdk/branches/jchempaint-primary/src/main/org/openscience/cdk/controller/IChemModelRelay.java 2008-11-26 20:13:40 UTC (rev 13321) @@ -48,9 +48,7 @@ public abstract void updateImplicitHydrogenCounts(); public void zap(); public void addRing(int size); - public void addRing(int size, boolean benzene); public void addRing(IAtom atom, int size); - public void addRing(IAtom atom, int size, boolean benzene); public void addPhenyl(IAtom atom); // public void addRing(IBond atom, int size); public void cleanup(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |