Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Scientific Software
MDANSE
Commits
77f8681c
Commit
77f8681c
authored
Feb 02, 2019
by
Remi Perenon
Browse files
Ensure unsubscription in the molecular viewer
parent
d8733d71
Changes
1
Hide whitespace changes
Inline
Side-by-side
Src/GUI/Plugins/MolecularViewerPlugin.py
View file @
77f8681c
...
...
@@ -251,12 +251,17 @@ class MolecularViewerPlugin(ComponentPlugin):
self
.
SetFocusIgnoringChildren
()
def
close
(
self
):
def
close
(
self
):
# Ensure unsubscription
self
.
__unsubscribe
()
# Clear the viewer
self
.
clear_universe
()
def
__del__
(
self
):
def
__del__
(
self
):
# Ensure unsubscription
self
.
__unsubscribe
()
def
__unsubscribe
(
self
):
PUBLISHER
.
unsubscribe
(
self
.
msg_set_selection
,
"msg_set_selection"
)
PUBLISHER
.
unsubscribe
(
self
.
msg_switch_viewers_state
,
"msg_switch_viewers_state"
)
PUBLISHER
.
unsubscribe
(
self
.
msg_clear_selection
,
'msg_clear_selection'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment