Skip to content

Commit 7c45420

Browse files
committed
ensure2d can reorder components, call this after we have assigned ids.
1 parent f7180e5 commit 7c45420

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,8 +412,6 @@ 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!
416-
417415
final Color fgcol = getParameterValue(StandardGenerator.AtomColor.class).getAtomColor(rxn.getBuilder()
418416
.newInstance(IAtom.class, "C"));
419417

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

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)