enthought / enthought/traitsui
Unintuitive behavior of RangeEditor when mode is explicitly set
- Dominant language
- Python
- Stars
- 306
- Forks
- 99
- PR merge metrics
- No merged PRs in 30d
Description
Currently the actual range editor used in a "View" do not always conform to the one specified with the mode option, which is unintuitive.
For example if the range is given by low=0 and high=None the actual range editor used is always RangeTextEditor no matter if you specified mode='xslider' or mode='spinner'. That is unexpected. I would expect that explicit set mode would take precedence over automatic settings.
The lines controlling this behavior is given below in _get_simple_editor_class and _get_custom_editor_class methods:
https://github.com/enthought/traitsui/blob/87dceb219b8b7b547907f031aaca70e1a66b7945/traitsui/editors/range_editor.py#L214-L245
https://github.com/enthought/traitsui/blob/87dceb219b8b7b547907f031aaca70e1a66b7945/traitsui/editors/range_editor.py#L247-L271
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.