Skip to content

remove invalid flag from dictchoice dialog - #1705

Merged
David-Baddeley merged 1 commit into
python-microscopy:masterfrom
barentine:wxflagfix
Sep 11, 2026
Merged

remove invalid flag from dictchoice dialog#1705
David-Baddeley merged 1 commit into
python-microscopy:masterfrom
barentine:wxflagfix

Conversation

@barentine

Copy link
Copy Markdown
Member

Addresses issue #invalid wx alignment flags stoped the dictstringeditor from coming up when trying to e.g. use Output.HDFOutput recipe module in the recipe editor.

Traceback

'''
Traceback (most recent call last):
File "/Users/andy/code/python-microscopy/PYME/ui/custom_traits_editors.py", line 277, in OnFilterAdd
dlg = DictChoiceStrEditDialog(self, mode='new',
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/andy/code/python-microscopy/PYME/ui/custom_traits_editors.py", line 134, in init
vsizer.Add(hsizer, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALL, 5)
wx._core.wxAssertionError: C++ assertion "CheckSizerFlags(!((flags) & (wxALIGN_CENTRE_VERTICAL)))" failed at ./src/common/sizer.cpp(2273) in DoInsert(): wxALIGN_CENTRE_VERTICAL will be ignored in this sizer: only horizontal alignment flags can be used in vertical sizers

DO NOT PANIC !!

If you're an end user running a program not developed by you, please ignore this message, it is harmless, and please try reporting the problem to the program developers.

You may also set WXSUPPRESS_SIZER_FLAGS_CHECK environment variable to suppress all such checks when running this program.

If you're the developer, simply remove this flag from your code to avoid getting this message. You can also call wxSizerFlags::DisableConsistencyChecks() to globally disable all such checks, but this is strongly not recommended.
'''

Is this a bugfix or an enhancement?
maintenance
Proposed changes:
remove flags which were ignored anyway

Checklist:

wxpython 4.2.5 py311h8325047_2 conda-forge
wxwidgets 3.2.9 h34c1157_0 conda-forge

Screenshot 2026-09-10 at 2 40 47 PM

@David-Baddeley
David-Baddeley merged commit e4c4858 into python-microscopy:master Sep 11, 2026
4 of 6 checks passed
@David-Baddeley

Copy link
Copy Markdown
Contributor

Thought we'd already got all of these ...

@barentine

Copy link
Copy Markdown
Member Author

Seems like a new batch cropped up 🙃
After this one I had Claude write a test to find them. Will hopefully have a chance to spot check a few and PR it tomorrow

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