Skip to content

Commit

Permalink
Stop monitoring attribute changes when tool closed [#16185]
Browse files Browse the repository at this point in the history
  • Loading branch information
e-pettersen committed Oct 28, 2024
1 parent b1f63f9 commit c28e2bf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/bundles/render_by_attr/bundle_info.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<BundleInfo name="ChimeraX-RenderByAttr" version="1.6"
<BundleInfo name="ChimeraX-RenderByAttr" version="1.6.1"
package="chimerax.render_by_attr"
minSessionVersion="1" maxSessionVersion="1">

Expand Down
9 changes: 9 additions & 0 deletions src/bundles/render_by_attr/src/tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,15 @@ def default_render_worm_markers(self):
def default_render_worm_markers(self, markers):
self._default_render_worm_markers = self._clone_markers(markers)

def delete(self):
for index in [0,1]:
for attr_info, attr_monitorings in list(self._attr_monitorings.items()):
for attr_name, mode_monitoring in list(attr_monitorings.items()):
if mode_monitoring[index]:
attr_info.attr_change_notify(attr_name, None)
self._attr_monitorings.clear()
super().delete()

def fill_context_menu(self, menu, x, y):
from Qt.QtGui import QAction
scaling_menu = menu.addMenu("Histogram Scaling")
Expand Down

0 comments on commit c28e2bf

Please sign in to comment.