Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug-in-waiting: picking layer names #320

Open
tlambert03 opened this issue Mar 5, 2024 · 0 comments
Open

Bug-in-waiting: picking layer names #320

tlambert03 opened this issue Mar 5, 2024 · 0 comments

Comments

@tlambert03
Copy link
Member

There is a bug just waiting to happen in _mda_handler.

The layer is initially created with a name constructed manually as f"{fname}_{id_}" here:

fname = meta.file_name if meta.should_save else "Exp"
self._create_empty_image_layer(z, f"{fname}_{id_}", sequence, **kwargs)

and then that key is recreated (manually) for the purpose of looking up the layer in the viewer here:

# the name of this layer in the napari viewer
layer_name = f"{prefix}_{event.sequence.uid}{suffix}"

if either of those were ever changed, we'd have an issue. There should be one function that constructs a layer name, and that one function should always be used when retrieving the expected layer name

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

No branches or pull requests

1 participant