From 953e611b838ebed23718320dae33d9d260ff2a75 Mon Sep 17 00:00:00 2001 From: John May Date: Thu, 6 Oct 2016 20:26:02 +0100 Subject: [PATCH] Special case should only kick in when the atom count is 2. --- .../org/openscience/cdk/layout/StructureDiagramGenerator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java b/tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java index 14a8bcc8f05..f7d517da9c9 100644 --- a/tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java +++ b/tool/sdg/src/main/java/org/openscience/cdk/layout/StructureDiagramGenerator.java @@ -529,7 +529,7 @@ private void generateCoordinates(Vector2d firstBondVector, boolean isConnected, if (numAtoms == 1) { molecule.getAtom(0).setPoint2d(new Point2d(0, 0)); return; - } else if (molecule.getBondCount() == 1) { + } else if (molecule.getBondCount() == 1 && molecule.getAtomCount() == 2) { double xOffset = 0; for (IAtom atom : molecule.atoms()) { atom.setPoint2d(new Point2d(xOffset, 0));