enthought / enthought/traitsui

`KeyBinding.owner` trait is problematic

Open
#1,816 2 comments 0 reactions 0 assignees View on GitHub
component: core difficulty: intermediate priority: low type: cleanup
Dominant language
Python
Stars
306
Forks
99
PR merge metrics
No merged PRs in 30d

Description

The `KeyBinding.owner` trait is set when a new `KeyBindings` object is created from a list of `KeyBinding` instances. However, when editing a `Keybindings` a new, temporary `KeyBindings` object is created with the sorted, flattened list of `KeyBinding` objects, and the `owner` assigned to this temporary object (which is then kept around as long as the `KeyBinding` instances exist or until the next time it is edited).

The `owner` trait is used for ascertaining that there are no other `KeyBinding` in the current set which conflict with changes, and to reset the potentially matching changes if the user OKs it. It is also used to check whether the current `KeyBindingEditor` has focus, which is currently held on the `KeyBindings` object that is actively being edited.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.