[feat] METEOR overlay cryofeature: clarify the current posture in "recalculate position" message box#3379
Conversation
…calculate position" message box In the FIBSEM tab, there are two view: SEM and FIB. If one moves the feature in the FIB view, she/he could beleive that this changes the MILLING posture, while moving the feature in SEM view would adjust the SEM posture. However, that's not the case, it's unrelated to the view, and only linked to the current posture (based on the current stage position). So adjust the dialog to highlight which posture is modified, if not updating all the posture.
There was a problem hiding this comment.
Pull request overview
This PR improves the clarity of the dialog shown when moving cryo features in the FIBSEM tab. The dialog now explicitly indicates which posture (SEM IMAGING, MILLING, FIB IMAGING, etc.) is being modified, addressing user confusion about whether the change affects the view-specific posture or the current posture based on stage position.
Changes:
- Import
POSITION_NAMESdictionary to map posture constants to human-readable names - Update dialog message to specify which posture is being modified
- Customize button labels to show "All" vs "Only [posture name]" options
📝 WalkthroughWalkthroughThis change modifies the user confirmation dialog in the cryo feature overlay's position update workflow. It imports Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/odemis/gui/comp/overlay/cryo_feature.py`:
- Around line 254-258: The call to box.SetYesNoLabels(...) may fail; check its
boolean return and handle the False case by updating the dialog text to a
generic yes/no question that matches the default "Yes"/"No" labels.
Specifically, after creating the wx.MessageDialog as box and calling
box.SetYesNoLabels("All", f"Only {current_posture_name}"), test the return value
and if it is False call box.SetMessage(...) (or otherwise set the dialog text)
to a fallback like "Apply this feature position only to the current posture
(Yes) or to all postures (No)?" so the prompt makes sense when the custom labels
couldn’t be applied.
In the FIBSEM tab, there are two view: SEM and FIB. If one moves the
feature in the FIB view, she/he could beleive that this changes the
MILLING posture, while moving the feature in SEM view would adjust the
SEM posture. However, that's not the case, it's unrelated to the view,
and only linked to the current posture (based on the current stage position).
So adjust the dialog to highlight which posture is modified, if not
updating all the posture.