diff options
author | root <root@ot-dev.in-silico.ch> | 2011-03-16 10:41:37 +0000 |
---|---|---|
committer | root <root@ot-dev.in-silico.ch> | 2011-03-16 10:41:37 +0000 |
commit | 5871003ea1b0aa15370d819f414f522b42fdd298 (patch) | |
tree | 3f509227617ca511e0b6ca5a520149d003a3bff0 | |
parent | 01b30f81d9154313eba834773b0e60bafa9b70eb (diff) | |
parent | 2c9ad4fa3291f0f77ac922e32f60acc2caa326b0 (diff) |
Merge branch 'hotfix/v1.0.2' into development
-rw-r--r-- | java/Structure.class | bin | 7323 -> 7584 bytes | |||
-rw-r--r-- | java/Structure.java | 8 |
2 files changed, 6 insertions, 2 deletions
diff --git a/java/Structure.class b/java/Structure.class Binary files differindex 04af869..fc78c0b 100644 --- a/java/Structure.class +++ b/java/Structure.class diff --git a/java/Structure.java b/java/Structure.java index af0f3b4..38a6b37 100644 --- a/java/Structure.java +++ b/java/Structure.java @@ -102,7 +102,6 @@ public class Structure{ private void layout() { try { Rectangle2D last = new Rectangle(0,0); - //for (int i = 0; i < moleculeSet.getMoleculeCount(); i++) { // reverse iteration to show small molecules at the right side for (int i = moleculeSet.getMoleculeCount()-1; i >= 0 ; i--) { IAtomContainer mol = moleculeSet.getMolecule(i); @@ -111,7 +110,12 @@ public class Structure{ mol = sdg.getMolecule(); // get size of previous mol and shift to the right // gives nasty results for single atom molecules, but works otherwise - last = GeometryTools.shiftContainer(mol, GeometryTools.getRectangle2D(mol), last, 0); + // last = GeometryTools.shiftContainer(mol, GeometryTools.getRectangle2D(mol), last, 0); + // fix suggested by http://sourceforge.net/mailarchive/forum.php?thread_name=AANLkTikJQSjFkNCmO2gb0jw5PQxZRoFSTbruOa2DMCmZ%40mail.gmail.com&forum_name=cdk-jchempaint + // shifts single atoms to the right, but does not adjust the layout of larger structures + Rectangle2D bb = GeometryTools.getRectangle2D(mol); + Rectangle2D minBB = new Rectangle2D.Double(bb.getX(), bb.getY(), Math.max(bb.getWidth(), 15), bb.getHeight()); + last = GeometryTools.shiftContainer(mol, minBB, last, 0); coordinated_mols[i] = (IMolecule) mol; } moleculeSet.setMolecules(coordinated_mols); |