Skip to content

Fix: Exit early from update_orthos() when orthos are off#1458

Draft
mrariden wants to merge 1 commit into
mainfrom
3d_ortho_fix
Draft

Fix: Exit early from update_orthos() when orthos are off#1458
mrariden wants to merge 1 commit into
mainfrom
3d_ortho_fix

Conversation

@mrariden
Copy link
Copy Markdown
Collaborator

@mrariden mrariden commented May 22, 2026

When the orthos were off in the 3d gui and update_orthos() was called, an error would occur because zmax was unset:

zrange = zmax - zmin
self.layer_ortho = [
np.zeros((self.Ly, zrange, 4), "uint8"),
np.zeros((zrange, self.Lx, 4), "uint8")

The fix is to return from update_orthos() early when the orthobtn is unchecked. I just added a guard clause and unindented the block in the first if statement.

  • Gui testing protocol
  • Tests passing

@mrariden mrariden changed the title return early when orthos are off Fix: Exit early from update_orthos() when orthos are off May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant