Skip to content

Commit b6c0a4b

Browse files
xiao-1011claude
andauthored
Fix unit visibility change not propagating to other views (#264)
`get_visible_unit_ids()` returned a direct reference to the internal `_visible_unit_ids` list. Callers that snapshot the list before and after `set_unit_visibility()` to detect changes were comparing the same mutated object, so the comparison always found no difference and never triggered `notify_unit_visibility_changed()`. Return a copy instead so before/after comparisons work correctly. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent e1b5e7a commit b6c0a4b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

spikeinterface_gui/controller.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ def set_visible_unit_ids(self, visible_unit_ids):
600600

601601
def get_visible_unit_ids(self):
602602
"""Get list of visible unit_ids"""
603-
return self._visible_unit_ids
603+
return list(self._visible_unit_ids)
604604

605605
def get_visible_unit_indices(self):
606606
"""Get list of indices of visible units"""

0 commit comments

Comments
 (0)