forked from napari/napari
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug fixes to multiple issues with linked layers (napari#6623)
# References and relevant issues Closes napari#6619 # Description While testing napari#6622 I noted a number of issues with linked layers: 1) a removed layer remains linked (this was also reported in napari#6619 ) 2) if two points layers are linked and you try to add a point to either one you get: `ValueError: The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().` 3) if you have a Labels layer linked to points, shapes, image and try to paint, you get: `ValueError: 'paint' is not a valid Mode` 4) if you have a Shapes layer linked to any other layer and try to draw a shape, you get: `ValueError: 'add_rectangle' is not a valid Mode` This is a PR to fix them. - unlink layers before removing from layer list - add equality operator for pandas DF, so that `pick_equality_operator` works for Points - add things to the `exclude` list that are problematic because: - they either are data related (e.g. features/properties) - depend on number of <data elements> (e.g. edge_width, face_color, edge_color) - are not compatible between layers (e.g. mode) I've added tests for: - unlinking of removed layers (this fails on main) - the pandas equality operator - linked points layers (this fails on main) - linked layer modes (this fails on main) --------- Co-authored-by: Grzegorz Bokota <[email protected]>
- Loading branch information
1 parent
a7da21e
commit dab2a86
Showing
6 changed files
with
72 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters