Commit a2e45b2ae5707eeb24d81ff8b94d59bfd5afd819
1 parent
fea0946c
Exists in
master
and in
68 other branches
FIX: Remove old actors from render when proejct is closed
Showing
2 changed files
with
3 additions
and
0 deletions
Show diff stats
invesalius/data/surface.py
| @@ -120,6 +120,8 @@ class SurfaceManager(): | @@ -120,6 +120,8 @@ class SurfaceManager(): | ||
| 120 | self.CloseProject() | 120 | self.CloseProject() |
| 121 | 121 | ||
| 122 | def CloseProject(self): | 122 | def CloseProject(self): |
| 123 | + for index in self.actors_dict: | ||
| 124 | + ps.Publisher().sendMessage('Remove surface actor from viewer', self.actors_dict[index]) | ||
| 123 | del self.actors_dict | 125 | del self.actors_dict |
| 124 | self.actors_dict = {} | 126 | self.actors_dict = {} |
| 125 | 127 |
invesalius/data/viewer_volume.py
| @@ -124,6 +124,7 @@ class Viewer(wx.Panel): | @@ -124,6 +124,7 @@ class Viewer(wx.Panel): | ||
| 124 | ps.Publisher().subscribe(self.OnShowText, | 124 | ps.Publisher().subscribe(self.OnShowText, |
| 125 | 'Show text actors on viewers') | 125 | 'Show text actors on viewers') |
| 126 | 126 | ||
| 127 | + | ||
| 127 | def OnHideText(self, pubsub_evt): | 128 | def OnHideText(self, pubsub_evt): |
| 128 | self.text.Hide() | 129 | self.text.Hide() |
| 129 | self.interactor.Render() | 130 | self.interactor.Render() |