enthought / enthought/traitsui
Window restoration broken on wx
- Dominant language
- Python
- Stars
- 306
- Forks
- 99
- PR merge metrics
- No merged PRs in 30d
Description
Modifying the issue to be more broad than one editor as it affects quite a few demos, including the demo app itself. It is impossible to launch the same wx application more than once because of the bug in window restoration code. This is seen using wx 4.0 and wx 4.1 on MacOS.
**Original description**
First time `Standard_Editors/DataFrameEditor_demo.py` launches and works as expected. Trying to launch the demo again right after closing fails with the following error:
```
Traceback (most recent call last):
File "/Users/icernyte/Documents/repos/traitsui/traitsui/wx/view_application.py", line 152, in OnInit
args=self.args,
File "/Users/icernyte/Documents/repos/traitsui/traitsui/view.py", line 462, in ui
ui.ui(parent, kind)
File "/Users/icernyte/Documents/repos/traitsui/traitsui/ui.py", line 246, in ui
self.rebuild(self, parent)
File "/Users/icernyte/Documents/repos/traitsui/traitsui/wx/toolkit.py", line 125, in ui_live
ui_live.ui_live(ui, parent)
File "/Users/icernyte/Documents/repos/traitsui/traitsui/wx/ui_live.py", line 52, in ui_live
_ui_dialog(ui, parent, BaseDialog.NONMODAL)
File "/Users/icernyte/Documents/repos/traitsui/traitsui/wx/ui_live.py", line 88, in _ui_dialog
BaseDialog.display_ui(ui, parent, style)
File "/Users/icernyte/Documents/repos/traitsui/traitsui/wx/ui_base.py", line 86, in display_ui
restore_window(ui, is_popup=(style in BaseDialog.POPUP_TYPES))
File "/Users/icernyte/Documents/repos/traitsui/traitsui/wx/helper.py", line 150, in restore_window
x, y, dx, dy = prefs
ValueError: not enough values to unpack (expected 4, got 2)
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.