Skip to content
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

Illegal flag in wx/ui_panel.py. FIX INCLUDED #828

Closed
jmoraleda opened this issue May 18, 2020 · 0 comments · Fixed by #829
Closed

Illegal flag in wx/ui_panel.py. FIX INCLUDED #828

jmoraleda opened this issue May 18, 2020 · 0 comments · Fixed by #829
Milestone

Comments

@jmoraleda
Copy link

jmoraleda commented May 18, 2020

Recent versions of wxWidgets are more strict about not allowing positioning flags that have no effect so one gets the error:

  File "/usr/lib/python3/dist-packages/traits/has_traits.py", line 2019, in edit_traits
    return view.ui(
  File "/usr/lib/python3/dist-packages/traitsui/view.py", line 446, in ui
    ui.ui(parent, kind)
  File "/usr/lib/python3/dist-packages/traitsui/ui.py", line 244, in ui
    self.rebuild(self, parent)
  File "/usr/lib/python3/dist-packages/traitsui/wx/toolkit.py", line 115, in ui_subpanel
    ui_panel.ui_subpanel(ui, parent)
  File "/usr/lib/python3/dist-packages/traitsui/wx/ui_panel.py", line 101, in ui_subpanel
    ui_panel_for(ui, parent, False)
  File "/usr/lib/python3/dist-packages/traitsui/wx/ui_panel.py", line 115, in ui_panel_for
    ui.control = control = Panel(ui, parent, buttons).control
  File "/usr/lib/python3/dist-packages/traitsui/wx/ui_panel.py", line 202, in __init__
    sw = panel(ui, cpanel)
  File "/usr/lib/python3/dist-packages/traitsui/wx/ui_panel.py", line 306, in panel
    sg_sizer, resizable, contents = fill_panel_for_group(
  File "/usr/lib/python3/dist-packages/traitsui/wx/ui_panel.py", line 467, in fill_panel_for_group
    fp = FillPanel(panel, group, ui, suppress_label, is_dock_window,
  File "/usr/lib/python3/dist-packages/traitsui/wx/ui_panel.py", line 613, in __init__
    self.add_items(content, panel, self.sizer)
  File "/usr/lib/python3/dist-packages/traitsui/wx/ui_panel.py", line 1041, in add_items
    item_sizer.Add(control, growable,
wx._core.wxAssertionError: C++ assertion "!(flags & wxALIGN_CENTRE_VERTICAL)" failed at /home/jorge/vc/Phoenix/ext/wxWidgets/src/common/sizer.cpp(2109) in DoInsert(): Vertical alignment flags are ignored in vertical sizers

FIX

To fix it, it suffices to remove | wx.ALIGN_CENTER_VERTICAL from line 1042 of wx/ui_panel.ui

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 a pull request may close this issue.

2 participants