Open Czaki opened 1 month ago
Could you explain a bit the background of this feature, what problem it tries to solve?
Could you explain a bit the background of this feature, what problem it tries to solve?
If one layer does not have some parameters set, then try to guess them to keep layers in same coordinate space.
For example:
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 92.49%. Comparing base (
36bb0d3
) to head (7c43158
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
4. Allow set item in
TransformChain
by name, not index (I may extract it to separate PR).
I haven't taken a proper look at this PR, but as a minor bonus, this fixes the almost 3-year old https://github.com/napari/napari/issues/3058
In the discussion there, we suggested removing the lookup by name feature entirely, but none of us felt too strongly. Given that supporting setting by name is easy, I think the addition here is also fine. Though I'd maybe expect the functionality to be in TransformChain
rather than EventedList
especially as psygnal's EventedList
does not support this functionality. None of this is blocking, but hopefully is useful information.
References and relevant issues
extracted from #6780
Description
This PR infroduces:
1)
SampleLayer
- simple layer to simplify and speedup testing that does not depend on given layer type. It is minimum class inheriting fromLayer
2) addparameters_with_default_values
property toLayer
andLayerList
to hold information which properties have default values. 3) inheritance foraffine
,rotate
,scale
,translate
(I need to dive deeper in shear). 4) Allow set item inTransformChain
by name, not index (I may extract it to separate PR).This PR adds a basic test. It will be improved If the whole shape looks good.