Commit db64309
Fix ROI shape-layer desync when switching drawing modes.
When napari emits shape-count drops during tool switches, the canvas could lose previously drawn ROIs even though they remained in the ROI manager list. Add a guarded resync path that repopulates the shapes layer from canonical ROI state, and reassert active-image context before recreating the shapes layer.
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent 11a0bad commit db64309
1 file changed
+17
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
825 | 825 | | |
826 | 826 | | |
827 | 827 | | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
828 | 832 | | |
829 | 833 | | |
830 | 834 | | |
| |||
934 | 938 | | |
935 | 939 | | |
936 | 940 | | |
937 | | - | |
| 941 | + | |
938 | 942 | | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
939 | 955 | | |
940 | 956 | | |
941 | 957 | | |
| |||
0 commit comments