Skip to content

can't delete clusters in "expanded" state #70

@lvavassori

Description

@lvavassori

If deleting a cluster that is in “expanded” state, the cluster remains visible in this state, and when “collapsed”, although it disappears, I get this error message:

ERROR:rendercanvas:Error during handling key_down event
Traceback (most recent call last):
File "/Users/lauravavassori/.local/lib/python3.13/site-packages/rendercanvas/_coreutils.py", line 50, in log_exception
yield
File "/Users/lauravavassori/.local/lib/python3.13/site-packages/pygfx/objects/_events.py", line 395, in handle_event
callback(event)
~~~~~~~~^^^^^^^
File "/Users/lauravavassori/tractome/tractome/app.py", line 696, in handle_key_strokes
self.collapse_streamline_bundles()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/Users/lauravavassori/tractome/tractome/app.py", line 732, in collapse_streamline_bundles
self._3D_scene.add(self._cluster_reps[bundle.rep])
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
KeyError: np.int32(3618)

After that, the only actions allowed are cluster selection, deselection or expansion (cannot collapse, delete, recluster or go back to previous state). It would be useful to allow removal of expanded clusters as it is more straightforward operationally - you visualise the streamlines and then you remove them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions