You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With #6117 the events.data emitter is fixed. However, the API for this emitter in setter.data in Points is now different from setter.data in Shapes. The API should be made consistent.
The text was updated successfully, but these errors were encountered:
# Fixes/Closes
Closes#6125
# Description
With #6117 the emitted data in the `data.setter` of `Points` has been
made more consistent with the emitted data when adding, changing or
removing data within the layer. However, in `Shapes` only the data
itself was emitted. Furthermore,
since the `data.setter` in Shapes called the public `.add` method and
emits data itself, a `layers.data` event was emitted twice.
This PR is a slight refactor so that `data.setter` can directly call the
private `_add_shapes` method, bypassing the `layer.data` emit in `.add`.
## Type of change
- [x] Bug-fix (non-breaking change which fixes an issue)
- [x] Maintenance (changes required to run napari, tests, & CI smoothly)
# How has this been tested?
- [x] example: the test suite for my feature covers cases x, y, and z
- [x] example: all tests pass with my change
- [x] example: I check if my changes works with both PySide and PyQt
backends
as there are small differences between the two Qt bindings.
## Final checklist:
- [x] My PR is the minimum possible work for the desired functionality
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] If I included new strings, I have used `trans.` to make them
localizable.
For more information see our [translations
guide](https://napari.org/developers/translations.html).
# Fixes/Closes
Closes#6125
# Description
With #6117 the emitted data in the `data.setter` of `Points` has been
made more consistent with the emitted data when adding, changing or
removing data within the layer. However, in `Shapes` only the data
itself was emitted. Furthermore,
since the `data.setter` in Shapes called the public `.add` method and
emits data itself, a `layers.data` event was emitted twice.
This PR is a slight refactor so that `data.setter` can directly call the
private `_add_shapes` method, bypassing the `layer.data` emit in `.add`.
## Type of change
- [x] Bug-fix (non-breaking change which fixes an issue)
- [x] Maintenance (changes required to run napari, tests, & CI smoothly)
# How has this been tested?
- [x] example: the test suite for my feature covers cases x, y, and z
- [x] example: all tests pass with my change
- [x] example: I check if my changes works with both PySide and PyQt
backends
as there are small differences between the two Qt bindings.
## Final checklist:
- [x] My PR is the minimum possible work for the desired functionality
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] If I included new strings, I have used `trans.` to make them
localizable.
For more information see our [translations
guide](https://napari.org/developers/translations.html).
馃О Task
With #6117 the
events.data
emitter is fixed. However, the API for this emitter insetter.data
inPoints
is now different fromsetter.data
inShapes
. The API should be made consistent.The text was updated successfully, but these errors were encountered: