Skip to content

Commit 29cfe7e

Browse files
authored
Merge pull request #806 from xosxos/ete4
Fix: handle `pack_leaves` when adjusting circle rect size
2 parents bfd84f2 + f590c46 commit 29cfe7e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ete4/treeview/qt_render.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ def render(root_node, img, hide_root=False):
268268
full_circle_area = (tree_radius * 2) ** 2
269269
cropped_area = (max_x - min_x) * (max_y - min_y)
270270

271-
if arc_span < 359 and (cropped_area / full_circle_area) < 0.75:
271+
if arc_span < 359 and (cropped_area / full_circle_area) < 0.75 and img.pack_leaves:
272272
mainRect.adjust(min_x, min_y, max_x, max_y)
273273
else:
274274
mainRect.adjust(-tree_radius, -tree_radius, tree_radius, tree_radius)

0 commit comments

Comments
 (0)