Skip to content

Commit

Permalink
fix(segmentations): Ensure plane viewer label update hook is deleted …
Browse files Browse the repository at this point in the history
…when viewers are
  • Loading branch information
zjp committed Nov 5, 2024
1 parent b19eef9 commit 1b8e6c3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/bundles/segmentations/src/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# including partial copies, of the software or any revisions
# or derivations thereof.
# === UCSF ChimeraX Copyright ===
__version__ = "3.2.5"
__version__ = "3.2.6"

from chimerax.core import runtime_env_is_chimerax_app as _runtime_env_is_chimerax_app
from chimerax.segmentations.segmentation import Segmentation, open_grids_as_segmentation
Expand Down
8 changes: 4 additions & 4 deletions src/bundles/segmentations/src/ui/label.py
Original file line number Diff line number Diff line change
Expand Up @@ -598,10 +598,10 @@ def __init__(
self.outline_width = outline_width
self.scalebar_width = scalebar_width # Angstroms
self.scalebar_height = scalebar_height # Pixels
self.drawing = d = LabelModel(session, self)
d.display = visibility
self.lb = Labels(session, view)
self.lb.add_label(self)
self.drawing = LabelModel(session, self)
self.drawing.display = visibility
self.labels = Labels(session, view)
self.labels.add_label(self)

def update_drawing(self):
d = self.drawing
Expand Down
2 changes: 2 additions & 0 deletions src/bundles/segmentations/src/ui/orthoplanes.py
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,8 @@ def _onSliderMoved(self):
def close(self):
# TODO: why does this call make it crash?
# self.setParent(None)
# TODO: Clean up the Label(s) interface
self.label.labels.delete()
self.label.delete()
chimerax.segmentations.triggers.remove_handler(
self.guideline_visibility_handler
Expand Down

0 comments on commit 1b8e6c3

Please sign in to comment.