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

Fixed some VTK error messages that showed up when ending configure #1177

Merged
merged 2 commits into from Mar 27, 2015
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 0 additions & 2 deletions Packages/vcs/Lib/configurator.py
Expand Up @@ -292,8 +292,6 @@ def detach(self):
# if all of the widgets have been cleaned up correctly, this will delete the manager
vtk_ui.manager.delete_manager(self.interactor)

self.interactor.Render()

def release(self, object, event):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

if self.clicking is None:
return
Expand Down
1 change: 1 addition & 0 deletions Packages/vcs/Lib/vtk_ui/manager.py
Expand Up @@ -78,6 +78,7 @@ def detach(self):
w.detach()
if self.window.HasRenderer(self.renderer):
self.window.RemoveRenderer(self.renderer)
self.renderer.RemoveAllViewProps()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You shouldn't need this but if you do then you want to set self.renderer = None since at this point I think it won't be of further use.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I basically only added this line as backup in case I screwed something up elsewhere; the "detach" functions are used throughout my vtk_ui package to make elements completely remove themselves from the VTK render stack and make them garbage collectable. I'll go ahead and set renderer to None here.

self.interactor.RemoveObserver(self.timer_listener)
self.window.RemoveObserver(self.window_mod)
self.window.RemoveObserver(self.render_listener)
Expand Down