fix: Fix trying to access to just deleted measurement profile from edit window.#1168
fix: Fix trying to access to just deleted measurement profile from edit window.#1168
Conversation
WalkthroughThe recent changes enhance the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant AdvancedWindow
User->>AdvancedWindow: Select profile item
AdvancedWindow->>AdvancedWindow: Check if item is None
alt Item is None
AdvancedWindow->>User: Show error message
else Item is not None
AdvancedWindow->>AdvancedWindow: Verify item in settings
alt Item is valid
AdvancedWindow->>User: Load profile description
else Item is invalid
AdvancedWindow->>User: Show error message
end
end
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
|
🧙 Sourcery has finished reviewing your pull request! Tips
|
There was a problem hiding this comment.
We've reviewed this pull request using the Sourcery rules engine. If you would also like our AI-powered code review then let us know.
|
There was a problem hiding this comment.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- package/PartSeg/_roi_analysis/advanced_window.py (1 hunks)
Additional comments not posted (1)
package/PartSeg/_roi_analysis/advanced_window.py (1)
536-538: Enhance the robustness of the profile selection logic.The added condition ensures that the selected item is not only present but also valid within the current measurement profiles. This prevents errors when accessing recently deleted profiles.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1168 +/- ##
========================================
Coverage 93.09% 93.09%
========================================
Files 209 209
Lines 32881 32881
========================================
Hits 30609 30609
Misses 2272 2272 ☔ View full report in Codecov by Sentry. |



fix PARTSEG-VE
Summary by CodeRabbit