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
e9aa2ee7
Commit
e9aa2ee7
authored
Sep 04, 2015
by
eric pellegrini
Browse files
Restablished the pubsub message when starting an animation while other
are running
parent
230fad10
Changes
1
Hide whitespace changes
Inline
Side-by-side
MDANSE/Framework/Plugins/MolecularViewerPlugin.py
View file @
e9aa2ee7
...
...
@@ -199,6 +199,8 @@ class MolecularViewerPanel(ComponentPlugin):
self
.
_iren
.
AddObserver
(
"LeftButtonPressEvent"
,
self
.
emulate_focus
)
self
.
_iren
.
Bind
(
wx
.
EVT_CONTEXT_MENU
,
self
.
on_show_popup_menu
)
pub
.
subscribe
(
self
.
switch_other_viewers_state
,
"switch_other_viewers_state"
)
self
.
_mgr
.
AddPane
(
self
.
_iren
,
aui
.
AuiPaneInfo
().
Dock
().
Center
().
CaptionVisible
(
False
).
CloseButton
(
False
))
...
...
@@ -263,13 +265,15 @@ class MolecularViewerPanel(ComponentPlugin):
self
.
set_trajectory
(
self
.
_trajectory
)
def
emulate_focus
(
self
,
obj
,
event
):
def
emulate_focus
(
self
,
obj
=
None
,
event
=
None
):
self
.
SetFocusIgnoringChildren
()
def
close
(
self
):
self
.
clear_universe
()
pub
.
unsubscribe
(
self
.
switch_other_viewers_state
,
"switch_other_viewers_state"
)
def
set_trajectory
(
self
,
trajectory
,
selection
=
None
,
frame
=
0
):
...
...
@@ -730,17 +734,20 @@ class MolecularViewerPanel(ComponentPlugin):
else
:
self
.
stop_animation
()
#
if check:
#
self.check_switch_consistancy(
)
if
check
:
pub
.
sendMessage
(
"switch_other_viewers_state"
,
viewer
=
self
)
#
pub.sendMessage('msg_animate_trajectory', plugin=self)
pub
.
sendMessage
(
'msg_animate_trajectory'
,
plugin
=
self
)
# def check_switch_consistancy(self):
#
# if not self._animationLoop:
# return
#
# self.start_stop_animation(check = False)
def
switch_other_viewers_state
(
self
,
viewer
):
if
not
self
.
_animationLoop
:
return
if
viewer
==
self
:
return
self
.
start_stop_animation
(
check
=
False
)
def
get_atom_index
(
self
,
pid
):
...
...
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