Issues when Task menu-bar is None
- Dominant language
- Python
- Stars
- 115
- Forks
- 54
- PR merge metrics
- No merged PRs in 30d
Description
When swapping between Tasks in a TaskWindow, if the new Task has no menu bar then the `menu_bar_manager` of the `TaskWindow` is `None` and as a result the change handlers on the parent `ApplicationWindow` do nothing, leaving the menu bar for the previous task in place.
See https://github.com/enthought/pyface/blob/42fbaf6e18883b8e5a662fc9ba108fd2408c91d3/pyface/ui/qt4/application_window.py#L171-L174
and
https://github.com/enthought/pyface/blob/42fbaf6e18883b8e5a662fc9ba108fd2408c91d3/pyface/ui/qt4/application_window.py#L78-L81
We should probably do something to ensure that when the `menu_bar_manager` changes to `None` that the current menu bar, if any, is removed. It may also be the case that we should ensure that a Task always has at least a minimal menu bar.
This may also affect Toolbars - this hasn't been investigated.
The work around for this is to ensure that end-user `Task` instances always have a menu bar.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.