schrodinger / pymol-open-source

Open-source foundation of the user-sponsored PyMOL molecular visualization system.
https://pymol.org/
Other
1.2k stars 281 forks source link

Avoid 3x2 grid for size=4 #276

Closed speleo3 closed 1 year ago

speleo3 commented 1 year ago

This pull request optimizes the number of columns and rows in grid mode. Previously, you could easily end up with a 3x2 instead of 2x2 grid with 4 elements, or a 4x2 instead of 3x2 grid for 5 elements.

Example:

set grid_mode
viewport 800, 400
fragment gly, m1
fragment gly, m2
fragment gly, m3
fragment gly, m4
Current master This Pull Request
grid-old grid-new
JarrettSJohnson commented 1 year ago

Cool. Thanks!

speleo3 commented 1 year ago

Thank you Jarrett :)