Skip to content

Commit 3848cf0

Browse files
committed
Roll back last change and extend comment to indicate why we want this.
1 parent 7c45420 commit 3848cf0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/depict/src/main/java/org/openscience/cdk/depict/DepictionGenerator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,8 @@ private static void setIfMissing(IChemObject chemObject, String key, String val)
412412
*/
413413
public Depiction depict(IReaction rxn) throws CDKException {
414414

415+
ensure2dLayout(rxn); // can reorder components if align is enabled!
416+
415417
final Color fgcol = getParameterValue(StandardGenerator.AtomColor.class).getAtomColor(rxn.getBuilder()
416418
.newInstance(IAtom.class, "C"));
417419

@@ -438,8 +440,6 @@ public Depiction depict(IReaction rxn) throws CDKException {
438440
layoutBackups.add(new LayoutBackup(mol));
439441
}
440442

441-
ensure2dLayout(rxn); // can reorder components!
442-
443443
final Map<IChemObject, Color> myHighlight = new HashMap<>();
444444
if (highlightAtomMap) {
445445
myHighlight.putAll(makeHighlightAtomMap(reactants, products));

0 commit comments

Comments
 (0)