Permalink
Browse files

Added removal of stereo elements in 'removeAllElements()' - documenta…

…tion has been updated
  • Loading branch information...
1 parent 3c15de5 commit 7fe738c18fce8c6b4466dfacfeb294d114a51b00 @johnmay committed Oct 31, 2012
@@ -1329,15 +1329,17 @@ public void removeAtomAndConnectedElectronContainers(IAtom atom)
}
/**
- * Removes all atoms and bond from this container.
+ * @inheritDoc
*/
+ @Override
public void removeAllElements() {
removeAllElectronContainers();
for (int f = 0; f < getAtomCount(); f++) {
getAtom(f).removeListener(this);
}
atoms = new IAtom[growArraySize];
atomCount = 0;
+ stereoElements.clear();
notifyChanged();
}
@@ -538,7 +538,7 @@
public void removeAtomAndConnectedElectronContainers(IAtom atom);
/**
- * Removes all atoms and bond from this container.
+ * Removes all atoms, bonds and stereo elements from this container.
*/
public void removeAllElements();
@@ -1293,12 +1293,14 @@ public void removeAtomAndConnectedElectronContainers(IAtom atom)
}
/**
- * Removes all atoms and bond from this container.
+ * @inheritDoc
*/
+ @Override
public void removeAllElements() {
removeAllElectronContainers();
atoms = new IAtom[growArraySize];
atomCount = 0;
+ stereoElements.clear();
}

3 comments on commit 7fe738c

egonw replied Nov 2, 2012

Applied and pushed.

egonw replied Nov 2, 2012

Oh, and yes, for this you could write a unit tests too...

Owner

johnmay replied Nov 2, 2012

will do

Please sign in to comment.