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

Frame Selector component: ensure that no color can be assigned twice #1387

Merged
merged 2 commits into from
Nov 29, 2023

Conversation

annehaley
Copy link
Collaborator

A user found that two channels called "DAPI" and "DAPI 1" are both assigned the same color. This is because they both match the following regex: '^DAPI.*$'. Only the first match should receive the mapped color for that regex.

This PR adds a check to the getChannelColor function that the color does not already exist in a list of used colors.

@annehaley annehaley requested a review from manthey November 28, 2023 19:19
@manthey
Copy link
Member

manthey commented Nov 28, 2023

A recent change to bugbear causes our linting to fail. I have a fix in #1388.

@manthey manthey merged commit 9a43c4e into master Nov 29, 2023
13 of 14 checks passed
@manthey manthey deleted the frame-selector-color-assignment branch November 29, 2023 13:21
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.

2 participants