Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 0 additions & 2 deletions Packages/vcs/Lib/configurator.py
Original file line number Diff line number Diff line change
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
Copy Markdown
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
2 changes: 2 additions & 0 deletions Packages/vcs/Lib/vtk_ui/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ def detach(self):
w.detach()
if self.window.HasRenderer(self.renderer):
self.window.RemoveRenderer(self.renderer)
self.renderer.RemoveAllViewProps()
Copy link
Copy Markdown
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
Copy Markdown
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.renderer = None
self.interactor.RemoveObserver(self.timer_listener)
self.window.RemoveObserver(self.window_mod)
self.window.RemoveObserver(self.render_listener)
Expand Down