Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| def set_channel(self, channel: str, data: Dict[str, Tuple[int, int]]) -> None: | ||
| self._channel = channel | ||
| self.label.setText(f"Channel: {channel} relative to DAPI") | ||
| if channel not in self._offsets: | ||
| self._offsets[channel] = (0, 0) | ||
| if data and channel in data: | ||
| self._offsets[channel] = tuple(data[channel]) | ||
| self.dy_spin.blockSignals(True) |
There was a problem hiding this comment.
Clear per-channel offsets when slide changes
The alignment panel keeps a _offsets dictionary across slides, but set_channel() only overwrites an entry when the channel is missing or present in the new slide’s configuration. When a user opens slide A, adjusts Cy3 offsets, then switches to a slide whose alignment.json does not define Cy3 offsets, the existing entry is reused and subsequently persisted by _persist_current_config(). This silently copies the offsets from the previous slide into the new slide and misaligns every channel without any user action. The offsets should be reset when new slide data is provided or when the channel is not present in the passed dictionary.
Useful? React with 👍 / 👎.
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_68f9f9ca3bbc832b93dc15fd399c331a