-
Notifications
You must be signed in to change notification settings - Fork 40
[fix] FIBSEM tab XRC caused errors with wxPython 4.1+ #3333
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
base: master
Are you sure you want to change the base?
[fix] FIBSEM tab XRC caused errors with wxPython 4.1+ #3333
Conversation
The commit f8f7870 ([fix] update xrc files) changed some of the sizer flags which turned out to not be useful. On wxPython 4.1 (eg, Ubuntu 24.04) and later, these flags cause errors, like this: 15:43:12: XRC error: 281: horizontal alignment flag "wxALIGN_RIGHT" has no effect inside a horizontal box sizer, remove it and consider inserting a spacer instead 15:43:12: XRC error: 326: horizontal alignment flag "wxALIGN_RIGHT" has no effect inside a horizontal box sizer, remove it and consider inserting a spacer instead 15:43:12: XRC error: 1013: vertical alignment flag "wxALIGN_CENTER_VERTICAL" has no effect inside a vertical box sizer, remove it and consider inserting a spacer instead => Remove these unneeded flags.
📝 WalkthroughWalkthroughThis pull request modifies wxWidgets GUI resource definition files by simplifying alignment style flags in widget declarations. The changes remove or reduce alignment flags such as Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Removes invalid/unnecessary XRC sizer alignment flags in the FIBSEM tab resources to avoid wxPython 4.1+ XRC load errors (notably on Ubuntu 24.04+).
Changes:
- Removed
wxALIGN_RIGHTfrom sizer item flags where it has no effect in horizontal box sizers (and triggers wxPython 4.1+ XRC errors). - Removed
wxALIGN_CENTER_VERTICALwhere it has no effect in a vertical box sizer (and triggers wxPython 4.1+ XRC errors). - Updated the embedded/generated resource content in
main_xrc.pyto match the corrected XRC.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/odemis/gui/xmlh/resources/panel_tab_fibsem.xrc | Removes the problematic alignment flags in the FIBSEM tab XRC layout to prevent XRC parsing errors. |
| src/odemis/gui/main_xrc.py | Mirrors the same flag removals in the pywxrc-generated embedded resources so runtime loading uses the corrected layout. |
The commit f8f7870 ([fix] update xrc files) changed some of the
sizer flags which turned out to not be useful. On wxPython 4.1 (eg,
Ubuntu 24.04) and later, these flags cause errors, like this:
=> Remove these unneeded flags.