Iterator<IAtom> it2 = mergeMap.keySet().iterator();
while (it2.hasNext()) {
IAtom remove = it2.next();
undoRedoContainer.removeAtom(remove);
}
IUndoRedoable moveundoredo = getUndoRedoFactory().getMoveAtomEdit(
undoRedoContainer, movedDistance, "Move atom");
IUndoRedoable undoredo = factory.getMergeMoleculesEdit(mergedAtoms,
containers, droppedContainers, removedBondss,
bondsWithReplacedAtoms, movedDistance, mergedPartnerAtoms,
moveundoredo, oldRGroupHash, newRGroupHash,
"Move and merge atoms", this);
handler.postEdit(undoredo);