Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for #1196 #1202

Merged
merged 2 commits into from
Apr 8, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions Packages/vcs/Lib/configurator.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,9 @@ def update(self):
display._template_origin = new_template.name

def detach(self):
if self.animation_timer is not None:
self.stop_animating()

if self.toolbar is not None:
self.toolbar.detach()
self.toolbar = None
Expand All @@ -247,14 +250,12 @@ def detach(self):
self.target.detach()
self.target = None

if self.animation_timer is not None:
self.stop_animating()

for listener in self.listeners:
self.interactor.RemoveObserver(listener)

# if all of the widgets have been cleaned up correctly, this will delete the manager
vtk_ui.manager.delete_manager(self.interactor)
self.interactor.GetRenderWindow().Render()

def release(self, object, event):
if self.clicking is None:
Expand Down Expand Up @@ -594,7 +595,7 @@ def set_animation_speed(self, value):
return v

def animate(self, obj, event):
if self.animation_timer is not None and datetime.datetime.now() - self.animation_last_frame_time > datetime.timedelta(0, 0, 0, int(.9 * 1000. / self.animation_speed)):
if self.animation_timer is not None and datetime.datetime.now() - self.animation_last_frame_time > datetime.timedelta(0, 0, 0, self.animation_speed):
self.animation_last_frame_time = datetime.datetime.now()
self.canvas.animate.draw_frame((self.canvas.animate.frame_num + 1) % self.canvas.animate.number_of_frames(), render_offscreen=False, allow_static=False)

Expand Down