File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
tool/sdg/src/main/java/org/openscience/cdk/layout Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -893,18 +893,18 @@ private void refinePlacement(IAtomContainer molecule) {
893893 LayoutRefiner refiner = new LayoutRefiner (molecule , afix , bfix );
894894 refiner .refine ();
895895
896- // choose the orientation in which to display the structure
897- if (selectOrientation ) {
898-
899- // check for attachment points, these override the direction which we rorate structures
900- IAtom begAttach = null ;
901- for (IAtom atom : molecule .atoms ()) {
902- if (atom instanceof IPseudoAtom && ((IPseudoAtom ) atom ).getAttachPointNum () == 1 ) {
903- begAttach = atom ;
904- break ;
905- }
896+ // check for attachment points, these override the direction which we rorate structures
897+ IAtom begAttach = null ;
898+ for (IAtom atom : molecule .atoms ()) {
899+ if (atom instanceof IPseudoAtom && ((IPseudoAtom ) atom ).getAttachPointNum () == 1 ) {
900+ begAttach = atom ;
901+ selectOrientation = true ;
902+ break ;
906903 }
904+ }
907905
906+ // choose the orientation in which to display the structure
907+ if (selectOrientation ) {
908908 // no attachment point, rotate to maximise horizontal spread etc.
909909 if (begAttach == null ) {
910910 selectOrientation (molecule , DEFAULT_BOND_LENGTH , 1 );
You can’t perform that action at this time.
0 commit comments